配置文件兼容带BOM的UTF-8

This commit is contained in:
John Smith 2021-07-17 13:17:40 +08:00
parent 6a4faa83a4
commit 8780655341

View File

@ -62,7 +62,7 @@ class AppConfig:
def load(self, path):
try:
config = configparser.ConfigParser()
config.read(path, 'utf-8')
config.read(path, 'utf-8-sig')
self._load_app_config(config)
self._load_translator_configs(config)