[Python-Dev] Re: Plan to remove Py_UNICODE APis except PEP 623.

2020年7月02日 08:04:00 -0700

On 2020年07月02日 14:57, Victor Stinner wrote:
Le jeu. 2 juil. 2020 à 14:44, Barry Scott <[email protected]> a écrit :
It's not obvious to me why the latin1 encoding is in this list as its just one 
of all the 8-bit char sets.
Why is it needed?
The Latin-1 (ISO 8859-1) charset is kind of special: it maps bytes
0x00-0xFF to Unicode characters U+0000-U+00FF and decoding from latin1
cannot fail.
This apparently makes it useful for not-quite-text, not-quite-bytes protocols like HTTP. In particular, WSGI (PEP 3333) uses latin-1 for headers.
It was commonly used as the locale encoding in Europe 10 years ago,
but nowadays most Linux distributions use UTF-8 as the locale
encoding.
I'm also fine with restricting the list to 3 encodings: ASCII, UTF-8
and Windows ANSI code page.
_______________________________________________
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/DQI2UW5WOQ3EMHRP5VEGDG3MIU364I6K/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to