Fix conversion script for degree symbol etc

This commit is contained in:
Tyeth Gundry 2025-08-11 14:03:25 +01:00
parent 4ace2bc551
commit 6ef92f1809

View file

@ -268,12 +268,12 @@ def convert_components_to_json():
# Write the consolidated JSON file
with open(OUTPUT_FILE, 'w') as f:
json.dump({"components": components}, f, indent=2)
json.dump({"components": components}, f, ensure_ascii=False, indent=2)
# Write the consolidated JS file
with open(OUTPUT_FILE.replace('.json', '.js'), 'w') as f:
f.write("window.jsonComponentsObject = ")
json.dump({"components": components}, f, indent=2)
json.dump({"components": components}, f, ensure_ascii=False, indent=2)
f.write(";\n")
print(f"Successfully created {OUTPUT_FILE}")