mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 14:37: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
|
@ -100,7 +100,7 @@ class LegacyProfileReader(ProfileReader):
|
|||
return None
|
||||
|
||||
try:
|
||||
with open(os.path.join(PluginRegistry.getInstance().getPluginPath("LegacyProfileReader"), "DictionaryOfDoom.json"), "r", -1, "utf-8") as f:
|
||||
with open(os.path.join(PluginRegistry.getInstance().getPluginPath("LegacyProfileReader"), "DictionaryOfDoom.json"), "r", encoding = "utf-8") as f:
|
||||
dict_of_doom = json.load(f) # Parse the Dictionary of Doom.
|
||||
except IOError as e:
|
||||
Logger.log("e", "Could not open DictionaryOfDoom.json for reading: %s", str(e))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue