[issue38667] PYTHONCOERCECLOCALE=0 ignored

Christoph Reiter report at bugs.python.org
Sat Nov 2 09:14:24 EDT 2019


New submission from Christoph Reiter <reiter.christoph at gmail.com>:

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 this locale coercion behavior).
utf-8

$ LC_CTYPE=C PYTHONCOERCECLOCALE=0 python3 -c "import sys; print(sys.getfilesystemencoding())"   
utf-8

The warning states that passing PYTHONCOERCECLOCALE=0 disables the coercion, but it doesn't change anything in 3.7 and 3.8.

What am I missing?

----------
messages: 355868
nosy: lazka
priority: normal
severity: normal
status: open
title: PYTHONCOERCECLOCALE=0 ignored
versions: Python 3.7, Python 3.8

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38667>
_______________________________________


More information about the Python-bugs-list mailing list