[issue6393] OS X: python3 from python-3.1.dmg crashes at startup

Ronald Oussoren report at bugs.python.org
Thu Jul 9 10:02:55 CEST 2009


Ronald Oussoren <ronaldoussoren at mac.com> added the comment:

The manpage says that nl_langinfo returns an empty string when there is 
an invalid setting.

There is validity in saying that 'LANG=utf-8' is an invalid setting, the 
LANG variable is supposed to a locale name, which would be a language 
setting (possibly combined with a codeset definition). "utf-8" is not a 
language.

I wouldn't mind falling back to utf-8 as the default codeset when 
nl_langinfo returns an empty string because utf-8 is the default 
character set on OSX, and furthermore defaulting to some value is way 
better than crashing.

I do wonder how the user ended up with LANG=utf-8 in the first place.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6393>
_______________________________________


More information about the Python-bugs-list mailing list