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:
|
with open(self.server_config_path, "w", encoding="utf-8") as w:
|
||||||
json.dump(self.server_config, w, indent=4)
|
json.dump(self.server_config, w, indent=4, ensure_ascii=False)
|
||||||
|
|
||||||
|
|
||||||
elif os.path.isfile(self.server_config_path):
|
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)
|
self.server_config = json.load(r)
|
||||||
print("config ファイルを読み込みました。")
|
print("config ファイルを読み込みました。")
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue