Thank you, Council members and all members joined in the long discussion.
On Tue, Mar 16, 2021 at 8:29 AM Guido van Rossum <guido@python.org> 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 <songofacandy@gmail.com>