[issue45232] ascii codec is used by default when LANG is not set

2021-09-17 Thread Eryk Sun
Eryk Sun added the comment: Python 3.7+ doesn't need to explicitly enable UTF-8 mode in this case on POSIX systems. If the locale encoding is the "POSIX" or "C" locale, and "C" locale coercion is not disabled via LC_ALL or PYTHONCOERCECLOCALE=0, the interpreter tries to coerce the LC_CTYPE l

[issue45232] ascii codec is used by default when LANG is not set

2021-09-17 Thread Marc-Andre Lemburg
Change by Marc-Andre Lemburg : -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___ ___ Py

[issue45232] ascii codec is used by default when LANG is not set

2021-09-17 Thread Olivier Delhomme
Olivier Delhomme added the comment: >> Hi Marc-Andre, >> >> Please note that setting PYTHONUTF8 with "export PYTHONUTF8=1": >> >> * Is external to the program and user dependent >> * It does not seems to work on my use case: >> >>$ unset LANG >>$ export PYTHONUTF8=1 >>$ python3 >>

[issue45232] ascii codec is used by default when LANG is not set

2021-09-17 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 17.09.2021 15:45, Olivier Delhomme wrote: > > Olivier Delhomme added the comment: > > Hi Marc-Andre, > > Please note that setting PYTHONUTF8 with "export PYTHONUTF8=1": > > * Is external to the program and user dependent > * It does not seems to work

[issue45232] ascii codec is used by default when LANG is not set

2021-09-17 Thread Olivier Delhomme
Olivier Delhomme added the comment: Hi Marc-Andre, Please note that setting PYTHONUTF8 with "export PYTHONUTF8=1": * Is external to the program and user dependent * It does not seems to work on my use case: $ unset LANG $ export PYTHONUTF8=1 $ python3 Python 3.6.4 (default, Jan 11 20

[issue45232] ascii codec is used by default when LANG is not set

2021-09-17 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Yes, this is intended. ASCII is used as fallback in case Python cannot determine the I/O encoding to use during startup. This is also the reason why later changes to the environment have no affect on this - the determination of the encoding has already been

[issue45232] ascii codec is used by default when LANG is not set

2021-09-17 Thread Olivier Delhomme
New submission from Olivier Delhomme : $ python3 --version Python 3.6.4 Setting LANG to en_US.UTF8 works like a charm $ export LANG=en_US.UTF8 $ python3 Python 3.6.4 (default, Jan 11 2018, 16:45:55) [GCC 4.8.5] on linux Type "help", "copyright", "credits" or "license" for more information.