From 7a1aa6a7db215255a6fcff4a244cc2597f624a4b Mon Sep 17 00:00:00 2001 From: suti7yk5032 Date: Thu, 15 Aug 2024 22:46:55 +0900 Subject: [PATCH] =?UTF-8?q?config=E3=83=95=E3=82=A1=E3=82=A4=E3=83=AB?= =?UTF-8?q?=E3=82=92=E6=98=8E=E7=A4=BA=E7=9A=84=E3=81=ABUTF-8=E3=81=A7?= =?UTF-8?q?=E8=AA=AD=E3=81=BF=E6=9B=B8=E3=81=8D=E3=81=99=E3=82=8B=E3=82=88?= =?UTF-8?q?=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dislocker.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dislocker.py b/dislocker.py index 353b06a..6ba28f5 100644 --- a/dislocker.py +++ b/dislocker.py @@ -52,12 +52,12 @@ class DL(): } } - with open(self.server_config_path, "w") as w: - json.dump(self.server_config, w, indent=4) + with open(self.server_config_path, "w", encoding="utf-8") as w: + json.dump(self.server_config, w, indent=4, ensure_ascii=False) elif os.path.isfile(self.server_config_path): - with open(self.server_config_path, "r") as r: + with open(self.server_config_path, "r", encoding="utf-8") as r: self.server_config = json.load(r) print("config ファイルを読み込みました。")