diff --git a/astrbot/core/config/astrbot_config.py b/astrbot/core/config/astrbot_config.py index bda02324e..6a415e56c 100644 --- a/astrbot/core/config/astrbot_config.py +++ b/astrbot/core/config/astrbot_config.py @@ -52,6 +52,9 @@ def __init__( with open(config_path, encoding="utf-8-sig") as f: conf_str = f.read() + # Handle UTF-8 BOM if present + if conf_str.startswith("\ufeff"): + conf_str = conf_str[1:] conf = json.loads(conf_str) # 检查配置完整性,并插入