[issue21509] json.load fails to read UTF-8 file with (BOM) Byte Order Marks

2014-05-17 Thread Kristian Benoit
Changes by Kristian Benoit : Added file: http://bugs.python.org/file35270/json.v2.patch ___ Python tracker <http://bugs.python.org/issue21509> ___ ___ Python-bugs-list m

[issue21509] json.load fails to read UTF-8 file with (BOM) Byte Order Marks

2014-05-17 Thread Kristian Benoit
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

[issue21509] json.load fails to read UTF-8 file with (BOM) Byte Order Marks

2014-05-14 Thread Kristian Benoit
New submission from Kristian Benoit: I'm trying to parse a json and keep getting ValueError. File reports the file as being "UTF-8 Unicode (with BOM) text", vim reports it as UTF-8, ... json.load docs says it support UTF-8 out of the box. Here's a link