From f1c7233763f036a835bbc6a28cf2f26cc4609d32 Mon Sep 17 00:00:00 2001 From: zrguo <49157727+LarFii@users.noreply.github.com> Date: Tue, 12 Aug 2025 17:06:54 +0800 Subject: [PATCH] Avoid UTF-8 BOM --- lightrag/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lightrag/utils.py b/lightrag/utils.py index 1eb8c98d..96b7bdc3 100644 --- a/lightrag/utils.py +++ b/lightrag/utils.py @@ -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)