[issue21509] json.load fails to read UTF-8 file with (BOM) Byte Order Marks
Kristian Benoit
report at bugs.python.org
Sat May 17 17:07:00 CEST 2014
Kristian Benoit added the comment:
I added code to skip the bom if present when encoding is either None or "utf-8". The problem I have with Victor's solution is that users don't know these files are not plain UTF-8. Most text editor says it's utf-8 encoded, how can a user figure out there 3 hidden bytes at the start of the file ?
Kristian
----------
keywords: +patch
Added file: http://bugs.python.org/file35269/json.patch
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21509>
_______________________________________
More information about the Python-bugs-list
mailing list