From b1ff76175f8b56a20155f831d601b0f891a7755b Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sat, 12 Sep 2015 17:36:00 +0100 Subject: Handle string encoding in style maps properly --- mammoth/docx/style_map.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'mammoth/docx') diff --git a/mammoth/docx/style_map.py b/mammoth/docx/style_map.py index 9d2646a..bf851e9 100644 --- a/mammoth/docx/style_map.py +++ b/mammoth/docx/style_map.py @@ -15,7 +15,7 @@ def write_style_map(fileobj, style_map): content_types_xml = _generate_content_types_xml(zip_file.read_str(_content_types_path)) update_zip(fileobj, { - _style_map_path: style_map, + _style_map_path: style_map.encode("utf8"), _relationships_path: relationships_xml, _content_types_path: content_types_xml, }) -- cgit v1.2.3