configファイルを明示的にUTF-8で読み書きするように
This commit is contained in:
parent
f7ecdc535f
commit
7a1aa6a7db
1 changed files with 3 additions and 3 deletions
|
@ -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 ファイルを読み込みました。")
|
||||
|
||||
|
|
Loading…
Reference in a new issue