This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ronaldoussoren
Recipients Phil, mark.dickinson, ned.deily, ronaldoussoren
Date 2009-07-09.08:02:54
SpamBayes Score 4.451232e-08
Marked as misclassified No
Message-id <1247126575.59.0.225585776744.issue6393@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2009-07-09 08:02:55ronaldoussorensetrecipients: + ronaldoussoren, mark.dickinson, ned.deily, Phil
2009-07-09 08:02:55ronaldoussorensetmessageid: <1247126575.59.0.225585776744.issue6393@psf.upfronthosting.co.za>
2009-07-09 08:02:54ronaldoussorenlinkissue6393 messages
2009-07-09 08:02:54ronaldoussorencreate