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

Marc-Andre Lemburg report at bugs.python.org
Fri Sep 17 10:10:40 EDT 2021


Marc-Andre Lemburg <mal at egenix.com> added the comment:

On 17.09.2021 15:45, Olivier Delhomme wrote:
> 
> Olivier Delhomme <olivier.delhomme at cea.fr> 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 2018, 16:45:55) 
>   [GCC 4.8.5] on linux
>   Type "help", "copyright", "credits" or "license" for more information.
>   >>> machaine='ééééhelp me if you can'
>      File "<stdin>", line 0
>     
>        ^
>    SyntaxError: 'ascii' codec can't decode byte 0xc3 in position 10: ordinal not in range(128)

UTF-8 mode is only supported in Python 3.7 and later:

   https://docs.python.org/3/whatsnew/3.7.html#whatsnew37-pep540
-- 
Marc-Andre Lemburg
eGenix.com

----------

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


More information about the Python-bugs-list mailing list