* Nick Coghlan <ncogh...@gmail.com>, 2017-12-06, 16:15:
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"?

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

The one that's relevant to default locale detection is just the string that "setlocale(LC_CTYPE, 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
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to