Fixed problems with 4872a6d

- Even when most tools takes utf8 == utf-8 the XML class don't
This commit is contained in:
Salvador E. Tropea 2022-06-09 13:58:29 -03:00
parent d91e98a495
commit 66c9e21865
1 changed files with 3 additions and 3 deletions

View File

@ -63,8 +63,8 @@ def write_xml(filename, groups, headings, head_names, cfg):
ElementTree.SubElement(xml, "group", attrib=attrib)
with open(filename, "wb") as output:
out = ElementTree.tostring(xml, encoding="utf8")
reparsed = minidom.parseString(out.decode('utf8'))
output.write(reparsed.toprettyxml(indent="\t", encoding="utf8"))
out = ElementTree.tostring(xml, encoding="utf-8")
reparsed = minidom.parseString(out.decode('utf-8'))
output.write(reparsed.toprettyxml(indent="\t", encoding="utf-8"))
return True