mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Set encoding correctly when opening files everywhere
Otherwise the encoding is interpreted differently on Windows and Mac.
This commit is contained in:
parent
c779795618
commit
54a03723ab
8 changed files with 13 additions and 13 deletions
|
@ -1018,7 +1018,7 @@ class XmlMaterialProfile(InstanceContainer):
|
|||
@classmethod
|
||||
def getProductIdMap(cls) -> Dict[str, List[str]]:
|
||||
product_to_id_file = os.path.join(os.path.dirname(sys.modules[cls.__module__].__file__), "product_to_id.json")
|
||||
with open(product_to_id_file) as f:
|
||||
with open(product_to_id_file, encoding = "utf-8") as f:
|
||||
product_to_id_map = json.load(f)
|
||||
product_to_id_map = {key: [value] for key, value in product_to_id_map.items()}
|
||||
return product_to_id_map
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue