mirror of
https://github.com/The-Pocket/PocketFlow-Tutorial-Codebase-Knowledge.git
synced 2026-08-29 08:34:31 +08:00
fix: update file opening encoding to utf-8-sig to handle files with BOM
This commit is contained in:
@@ -104,7 +104,7 @@ def crawl_github_files(
|
||||
|
||||
# Read content
|
||||
try:
|
||||
with open(abs_path, "r", encoding="utf-8") as f:
|
||||
with open(abs_path, "r", encoding="utf-8-sig") as f:
|
||||
content = f.read()
|
||||
files[rel_path] = content
|
||||
print(f"Added {rel_path} ({file_size} bytes)")
|
||||
|
||||
Reference in New Issue
Block a user