Skip to content

Commit 8b40334

Browse files
Enforce utf-8 encoding of the output xml file
1 parent c21e504 commit 8b40334

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

odml/tools/xmlparser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ def write_file(self, filename, local_style=False, custom_template=None):
199199
# calculate the data before opening the file in case we get any exception
200200
data = str(self)
201201

202-
with open(filename, "w") as file:
202+
with open(filename, "w", encoding = "utf-8") as file:
203203
file.write("%s\n" % XML_HEADER)
204204
if not local_style and not custom_template:
205205
file.write("%s\n" % EXTERNAL_STYLE_HEADER)

0 commit comments

Comments
 (0)