diff --git a/src/setup.py b/src/setup.py index 6ba88de..df7d415 100644 --- a/src/setup.py +++ b/src/setup.py @@ -191,10 +191,10 @@ def customInput() -> str | None: # 4 try: print("Changing launcher-settings.json...") - with open(gameFolder + "\\launcher-settings.json", "r") as f: + with open(gameFolder + "\\launcher-settings.json", "r", encoding="utf-8") as f: launcher = json.load(f) launcher["exePath"] = "runRPC.bat" - with open(gameFolder + "\\launcher-settings.json", "w") as f: + with open(gameFolder + "\\launcher-settings.json", "w", encoding="utf-8") as f: json.dump(launcher, f, indent=4) except Exception as e: print(e) diff --git a/src/uninstall.py b/src/uninstall.py index 3013fc5..7bb91da 100644 --- a/src/uninstall.py +++ b/src/uninstall.py @@ -54,10 +54,10 @@ # Revert launcher-settings.json try: print("Changing launcher-settings.json...") - with open(gameFolder + "\\launcher-settings.json", "r") as f: + with open(gameFolder + "\\launcher-settings.json", "r", encoding="utf-8") as f: launcher = json.load(f) launcher["exePath"] = "hoi4.exe" - with open(gameFolder + "\\launcher-settings.json", "w") as f: + with open(gameFolder + "\\launcher-settings.json", "w", encoding="utf-8") as f: json.dump(launcher, f, indent=4) except Exception as e: print(e)