[Python-Dev] PEP 540: Add a new UTF-8 mode (v2) (original) (raw)
Nick Coghlan ncoghlan at gmail.com
Wed Dec 6 19:31:04 EST 2017
- Previous message (by thread): [Python-Dev] PEP 540: Add a new UTF-8 mode (v2)
- Next message (by thread): [Python-Dev] PEP 540: Add a new UTF-8 mode (v2)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 7 December 2017 at 01:59, Jakub Wilk <jwilk at jwilk.net> wrote:
* Nick Coghlan <ncoghlan at gmail.com>, 2017-12-06, 16:15:
The one that's relevant to default locale detection is just the string that "setlocale(LCCTYPE, NULL)" returns. POSIX doesn't require any particular return value for setlocale() calls. It's only guaranteed that the returned string can be used in subsequent setlocale() calls to restore the original locale. So in the POSIX locale, a compliant setlocale() implementation could return "C", or "POSIX", or even something entirely different.
Thanks. I'd been wondering if we should also handle the "POSIX" case in the legacy locale detection logic, and you've convinced me that we should. Issue filed for that here: https://bugs.python.org/issue32238
Cheers, Nick.
-- Nick Coghlan | ncoghlan at gmail.com | Brisbane, Australia
- Previous message (by thread): [Python-Dev] PEP 540: Add a new UTF-8 mode (v2)
- Next message (by thread): [Python-Dev] PEP 540: Add a new UTF-8 mode (v2)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]