Fix psm output encoding to utf-8-bom
This commit is contained in:
+1
-1
@@ -175,6 +175,6 @@ def write_psm(name, items: list[str], filename: Path = Path("CodeServerConnector
|
|||||||
output += get_code.replace("!NAME!", name)
|
output += get_code.replace("!NAME!", name)
|
||||||
output += convert_from.replace("!NAME!", name).replace("!MAPS!", define_maps(items))
|
output += convert_from.replace("!NAME!", name).replace("!MAPS!", define_maps(items))
|
||||||
output += class_definition.replace("!NAME!", name).replace("!VARIABLES!", define_variables(items)).replace("!STRINGS!", define_strings(items))
|
output += class_definition.replace("!NAME!", name).replace("!VARIABLES!", define_variables(items)).replace("!STRINGS!", define_strings(items))
|
||||||
with open(filename, "a") as f:
|
with open(filename, "a", encoding="utf-8-sig") as f:
|
||||||
f.write(output)
|
f.write(output)
|
||||||
pass
|
pass
|
||||||
Reference in New Issue
Block a user