unknown locale de_DE at euro

Sean 'Shaleh' Perry shalehperry at attbi.com
Sun May 12 12:47:58 EDT 2002


On 12-May-2002 Martin v. Loewis wrote:
> "Sean 'Shaleh' Perry" <shalehperry at attbi.com> writes:
> 
>> > I recommend to either ignore or fix locale.getdefaultlocale; as is, it
>> > is utterly broken.
>> > 
>> > Why do you need it? If you want to obtain the locale's charset, use
>> > locale.nl_langinfo(locale.CODESET) (after performing setlocale).
>>
>> Because many non US linux dists are now shipping with their default
>> lang set to foo_FOO at euro.  Which means python dies when someone uses
>> it without first changing their locale.
> 
> Was that meant as an answer to the question "why do you need
> getdefaultlocale"? Then I don't understand that answer: what does the
> installation procedure of Linux distributions have to do with the API
> that you use in your Python application?
> 

Sorry, I misunderstood what the subject of your "why" was.

It still stands however that the locale.py needs updates to handle @ specified
locales.  Like them or not, they are here to stay.





More information about the Python-list mailing list