[issue14311] ConfigParser does not parse utf-8 files with BOM bytes

2012-03-20 Thread Łukasz Langa
Changes by Łukasz Langa : -- resolution: -> duplicate stage: needs patch -> committed/rejected status: open -> closed superseder: -> Python3: guess text file charset using the BOM versions: -Python 2.7, Python 3.2 ___ Python tracker

[issue14311] ConfigParser does not parse utf-8 files with BOM bytes

2012-03-16 Thread Łukasz Langa
Łukasz Langa added the comment: What you considered a workaround is actually what you should be using faced with BOM bytes. This is a broader issue in Python, not necessarily connected with ConfigParser or any other library. Also, this has been already reported here: http://bugs.python.org/i

[issue14311] ConfigParser does not parse utf-8 files with BOM bytes

2012-03-16 Thread Éric Araujo
Éric Araujo added the comment: Could you paste the exact code that fails? In 3.2+ there is a read_something method that takes an encoding argument, so that should work for example. -- nosy: +eric.araujo ___ Python tracker

[issue14311] ConfigParser does not parse utf-8 files with BOM bytes

2012-03-15 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +lukasz.langa stage: -> needs patch versions: +Python 3.2, Python 3.3 ___ Python tracker ___ ___

[issue14311] ConfigParser does not parse utf-8 files with BOM bytes

2012-03-14 Thread Sean Wang
New submission from Sean Wang : ConfigParser failed to parse a utf-8 file with BOM bytes('\xef\xbb\xbf'), it would raise ConfigParser.MissingSectionHeaderError. I think that other files with BOM would have the same problem; because the argument "SECTCRE" does not consider the BOM conditions. N