[Python-Dev] PEP 540: Add a new UTF-8 mode (v2) (original) (raw)
Nick Coghlan ncoghlan at gmail.com
Wed Dec 6 01:15:29 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 6 December 2017 at 15:59, Chris Angelico <rosuav at gmail.com> wrote:
On Wed, Dec 6, 2017 at 4:46 PM, Nick Coghlan <ncoghlan at gmail.com> wrote:
Something I've just noticed that needs to be clarified: on Linux, "C" locale and "POSIX" locale are aliases, but this isn't true in general (e.g. it's not the case on *BSD systems, including Mac OS X). For those of us with little to no BSD/MacOS experience, can you give a quick run-down of the differences between "C" and "POSIX"?
The one that's relevant to default locale detection is just the string that "setlocale(LC_CTYPE, NULL)" returns.
On Linux (or, more accurately, with glibc), after setting "LC_CTYPE=POSIX", that call still returns "C" (since the "POSIX" locale is defined as an alias for the "C" locale).
By contrast, on *BSD, it will return "POSIX" (since "POSIX" is actually a distinct locale there).
Beyond that, I don't know what the actual functional differences are.
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 ]