[issue19685] open() fails to autodetect utf-8 if LANG=C

2013-11-22 Thread Curtis Doty
New submission from Curtis Doty: I first stumbled across this bug attempting to install use pip's cool editable mode: $ pip install -e git+git://github.com/appliedsec/pygeoip.git#egg=pygeoip Obtaining pygeoip from git+git://github.com/appliedsec/pygeoip.git#egg=pygeoip Cloning git://github.co

[issue19685] open() fails to autodetect utf-8 if LANG=C

2013-11-21 Thread STINNER Victor
STINNER Victor added the comment: -exec(compile(open(__file__).read().replace('\\r\\n', '\\n'), __file__, 'exec')) +exec(compile(open(__file__,encoding='utf_8').read().replace('\\r\\n', '\\n'), __file__, 'exec')) The fix is not correct, the script may use a different encoding. Replace open() w

[issue19685] open() fails to autodetect utf-8 if LANG=C

2013-11-21 Thread STINNER Victor
STINNER Victor added the comment: pip is not part of the Python standard library, you should report it upstream: https://github.com/pypa/pip -- nosy: +ncoghlan ___ Python tracker ___