mirror of
https://github.com/amtoaer/bili-sync.git
synced 2026-05-26 02:39:54 +08:00
chore: 避免 json 配置中文乱码
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user