mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
CURA-3500 Make sure that material XMLs have utf-8 encoding
This commit is contained in:
parent
284e620da2
commit
18cf9e3172
1 changed files with 4 additions and 3 deletions
|
@ -248,11 +248,12 @@ class XmlMaterialProfile(InstanceContainer):
|
|||
|
||||
root = builder.close()
|
||||
_indent(root)
|
||||
stream = io.StringIO()
|
||||
stream = io.BytesIO()
|
||||
tree = ET.ElementTree(root)
|
||||
tree.write(stream, encoding="unicode", xml_declaration=True)
|
||||
# this makes sure that the XML header states encoding="utf-8"
|
||||
tree.write(stream, encoding="utf-8", xml_declaration=True)
|
||||
|
||||
return stream.getvalue()
|
||||
return stream.getvalue().decode('utf-8')
|
||||
|
||||
# Recursively resolve loading inherited files
|
||||
def _resolveInheritance(self, file_name):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue