Commit c0548f6
authored
Windows text editors (Notepad, VS Code with certain settings) may save
UTF-8 files with a Byte Order Mark (BOM, U+FEFF). Opening such files
with encoding='utf-8' causes json.load() to fail because the BOM
character appears before the opening '{'.
Change encoding from 'utf-8' to 'utf-8-sig' in load_json_config().
Python's utf-8-sig codec automatically strips the BOM when present,
while behaving identically to utf-8 for BOM-less files.
Co-authored-by: r266-tech <r266-tech@users.noreply.github.com>
1 parent c4cdb5f commit c0548f6
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
83 | | - | |
| 83 | + | |
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
| |||
0 commit comments