[issue38667] PYTHONCOERCECLOCALE=0 ignored

2019-11-03 Thread Christoph Reiter
Christoph Reiter added the comment: Thanks! I didn't quite see the relation between PEP 538 and PEP 540 after only reading the former. Anyone else finding this: See "Relationship with the locale coercion" in https://www.python.org/dev/peps/pep-0540/ for the details. -- resolution:

[issue38667] PYTHONCOERCECLOCALE=0 ignored

2019-11-03 Thread STINNER Victor
STINNER Victor added the comment: You should not use sys.getfilesystemencoding() nor locale.getpreferredencofing() to check if the C locale has been coerced, but read the LC_CTYPE locale instead: # C locale coerced $ LC_CTYPE=C python3 -c "import locale; print(locale.setlocale(locale.LC_CTYP

[issue38667] PYTHONCOERCECLOCALE=0 ignored

2019-11-02 Thread Karthikeyan Singaravelan
Change by Karthikeyan Singaravelan : -- nosy: +vstinner ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https

[issue38667] PYTHONCOERCECLOCALE=0 ignored

2019-11-02 Thread Christoph Reiter
New submission from Christoph Reiter : Python 3.7.5rc1 and 3.8.0 on Ubuntu 19.10 $ LC_CTYPE=C PYTHONCOERCECLOCALE=warn python3 -c "import sys; print(sys.getfilesystemencoding())" Python detected LC_CTYPE=C: LC_CTYPE coerced to C.UTF-8 (set another locale or PYTHONCOERCECLOCALE=0 to disable th