Set encoding correctly when opening files everywhere

Otherwise the encoding is interpreted differently on Windows and Mac.
This commit is contained in:
Ghostkeeper 2018-06-11 11:08:47 +02:00
parent c779795618
commit 54a03723ab
No known key found for this signature in database
GPG key ID: 5252B696FB5E7C7A
8 changed files with 13 additions and 13 deletions

View file

@ -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))