[Python-Dev] PEP 540: Add a new UTF-8 mode (v2) (original) (raw)

Jakub Wilk jwilk at jwilk.net
Wed Dec 6 10:59:44 EST 2017


POSIX says that "C" and "POSIX" are equivalent[0].

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.

Beyond that, I don't know what the actual functional differences are.

I don't believe there are any.

[0] http://pubs.opengroup.org/onlinepubs/9699919799/functions/setlocale.html

-- Jakub Wilk



More information about the Python-Dev mailing list