fix: update file opening encoding to utf-8-sig to handle files with BOM

This commit is contained in:
Ross Donald
2025-05-16 10:36:18 +10:00
parent 8cf3b6e3c2
commit 9e82cc8ed3
3 changed files with 10 additions and 10 deletions
+1 -1
View File
@@ -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)")