mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-26 02:07:36 +00:00
encoding clean up
the use of binary access to file was not intentional, switched to @aothms proposal.
This commit is contained in:
committed by
Thomas Krijnen
parent
15b24d8ba4
commit
ad135f70f1
@@ -156,13 +156,12 @@ class ids:
|
|||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
with open(filepath, "wb") as f:
|
with open(filepath, "w", encoding="utf-8") as f:
|
||||||
f.write('<?xml version="1.0" encoding="UTF-8"?>\n'.encode("utf-8"))
|
f.write('<?xml version="1.0" encoding="UTF-8"?>\n')
|
||||||
f.write("<!-- IDS (INFORMATION DELIVERY SPECIFICATION) CREATED USING IFCOPENSHELL -->\n".encode("utf-8"))
|
f.write("<!-- IDS (INFORMATION DELIVERY SPECIFICATION) CREATED USING IFCOPENSHELL -->\n")
|
||||||
f.write(ids_str.encode("utf-8"))
|
f.write(ids_str)
|
||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
# ids_schema.validate(filepath)
|
|
||||||
return ids_schema.is_valid(filepath)
|
return ids_schema.is_valid(filepath)
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
|||||||
Reference in New Issue
Block a user