Nick Coghlan added the comment:

Note that the coercion logic includes a runtime check to see if 
'setlocale(LC_CTYPE, "<locale_name>")' succeeds. That's how we skip over the 
non-existent C.UTF-8 and C.utf8 to get to "LC_CTYPE=UTF-8" on Mac OS X and 
FreeBSD.

That *appears* to work (and really does work on Mac OS X as far as CPython's 
test suite is concerned), but on FreeBSD we subsequently get the CODESET 
failure when we try to call `nl_langinfo` later in the interpreter startup 
process.

Victor's suggestion, which seems reasonable to me, is that we could also add 
the `nl_langinfo` call in the coercion logic, so that we never implicitly 
configure a locale setting that breaks nl_langinfo.

That way, instead of the interpreter failing to start, we'd just skip the 
locale coercion logic in that case (and update the test suite's expectations 
accordingly).

----------
nosy: +ncoghlan

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue30647>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to