From c5fc924b0abb665d25e85ee2eecc7917bf281c12 Mon Sep 17 00:00:00 2001 From: amtoaer Date: Sat, 25 Nov 2023 13:30:09 +0800 Subject: [PATCH] =?UTF-8?q?chore:=20=E9=81=BF=E5=85=8D=20json=20=E9=85=8D?= =?UTF-8?q?=E7=BD=AE=E4=B8=AD=E6=96=87=E4=B9=B1=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- settings.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/settings.py b/settings.py index 9f16d24..46a32d6 100644 --- a/settings.py +++ b/settings.py @@ -40,7 +40,9 @@ class Config(DataClassJsonMixin): try: path.parent.mkdir(parents=True, exist_ok=True) with path.open("w") as f: - f.write(Config.schema().dumps(self, indent=4)) + f.write( + Config.schema().dumps(self, indent=4, ensure_ascii=False) + ) return self except Exception as e: raise RuntimeError(f"Failed to save config file: {path}") from e