unknown locale de_DE at euro

Martin v. Loewis martin at v.loewis.de
Sun May 12 11:10:54 EDT 2002


"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?

Regards,
Martin




More information about the Python-list mailing list