From ab343c6ca70933ea8555285fb8452218fbacf60e Mon Sep 17 00:00:00 2001 From: songsenand Date: Sun, 25 Jan 2026 02:02:35 +0800 Subject: [PATCH] =?UTF-8?q?feat(config):=20=E5=A2=9E=E5=8A=A0=20allow=5Fun?= =?UTF-8?q?icode=20=E5=92=8C=20encoding=20=E5=8F=82=E6=95=B0=E4=BB=A5?= =?UTF-8?q?=E6=94=AF=E6=8C=81=20Unicode=20=E5=AD=97=E7=AC=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- autocommit/config.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/autocommit/config.py b/autocommit/config.py index f13f02b..7b8a94a 100644 --- a/autocommit/config.py +++ b/autocommit/config.py @@ -87,7 +87,10 @@ class ConfigManager: # 直接保存所有字段,不排除任何内容 config_dict = self._config.model_dump() with open(self.config_file, 'w', encoding='utf-8') as f: - yaml.dump(config_dict, f, default_flow_style=False) + yaml.dump(config_dict, f, + default_flow_style=False, + allow_unicode=True, # 新增:允许Unicode字符 + encoding='utf-8') # 确保编码 except Exception as e: print(f"保存配置失败: {e}")