Avoid UTF-8 BOM

This commit is contained in:
zrguo 2025-08-12 17:06:54 +08:00
parent f1c6a4ed94
commit f1c7233763

View file

@ -604,7 +604,7 @@ def wrap_embedding_func_with_attrs(**kwargs):
def load_json(file_name):
if not os.path.exists(file_name):
return None
with open(file_name, encoding="utf-8") as f:
with open(file_name, encoding="utf-8-sig") as f:
return json.load(f)