[Python-Dev] Re: [python-committers] Re: Accepting PEP 597 (Add optional EncodingWarning)

2021年3月15日 19:37:26 -0700

Thank you, Council members and all members joined in the long discussion.
On Tue, Mar 16, 2021 at 8:29 AM Guido van Rossum <[email protected]> wrote:
>
>>
>> Once the whole stdlib and most of top PyPI projects will be fixed to
>> no longer emit EncodingWarning, I will become safer to opt-in for
>> UTF-8 by default by enabling the Python UTF-8 Mode!
>> https://docs.python.org/dev/library/os.html#python-utf-8-mode
>>
>> One day, we will silently switch Python to UTF-8 by default, and
>> nobody will notice! ;-)
>
>
> In particular it's important that nobody living in Japan or China should 
> notice. This is also still the biggest challenge. :-(
>
Java has a very similar problem and proposal. See JEP 400 (*) that was
updated recently.
If JEP 400 is accepted, users can use `-Dfile.encoding=COMPAT` for
legacy behavior.
If UTF-8 mode is enabled by default, users can use `PYTHONUTF8=0` or
`-Xutf8=0` for legacy behavior.
(*) https://openjdk.java.net/jeps/400
Anyway, PEP 597 adds `encoding="locale"` option. Let's implement it in
Python 3.10 and wait 4 years.
Many libraries will use only UTF-8, or can drop Python 3.9 support and
use `encoding="locale"` where locale encoding is needed.
Regards,
-- 
Inada Naoki <[email protected]>
_______________________________________________
Python-Dev mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/[email protected]/message/EMYJ6KVCRNM3ZGPY6BWBVXHYBXIDPNU7/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to