From 015b6b880eb2597a11a33cb646568f9c06d20073 Mon Sep 17 00:00:00 2001 From: ThiaudioTT Date: Sun, 21 Apr 2024 13:50:07 -0300 Subject: [PATCH] fix(setup/uninstall): adds encoding as ut-f8 --- src/setup.py | 4 ++-- src/uninstall.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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)