I just reread PEP 597, then re-reread the Rationale.

The PEP helps when the locale is ASCII or C, but that isn't enforced in actual 
files.  I am confident that this is a frequent problem for packages downloaded 
from mostly-English sites, including many software repositories.

It does not seem to be a win when the locale is something incompatible with 
utf-8, such as Latin-1, or whatever is still common in Japan.  The 
surrogate-escape mechanism allows a proper round-trip, but python itself will 
stop processing the characters correctly.

For interactive use, when talking to another program (such as a terminal) 
instead of an already existing file, the backwards compatibility problem seems 
worse.

Changing the default to utf-8 (after a deprecation period showing how to make 
locale an explicit default) may be reasonable, but claiming that it is 
backwards compatible ... I didn't get that impression from the PEP.

-jJ
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at 
https://mail.python.org/archives/list/python-dev@python.org/message/RA5SLRB4M7IDLVZKQ3NWVACBLHII2BTR/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to