Skip to content

Commit

Permalink
Merge pull request #130 from gbmhunter/master
Browse files Browse the repository at this point in the history
Second fix for utf-8 bug in XML writer.
  • Loading branch information
SchrodingersGat authored Aug 5, 2020
2 parents 7621bd1 + d47196e commit 06a1486
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kibom/xml_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def WriteXML(filename, groups, net, headings, prefs):

ElementTree.SubElement(xml, "group", attrib=attrib)

with open(filename, "w") as output:
with open(filename, "w", encoding="utf-8") as output:
out = ElementTree.tostring(xml, encoding="utf-8")
# There is probably a better way to write the data to file (without so many encoding/decoding steps),
# but toprettyxml() without specifying UTF-8 will chew up non-ASCII chars. Perhaps revisit if performance here
Expand Down

0 comments on commit 06a1486

Please sign in to comment.