Probleme with locale
Alex Martelli
aleaxit at yahoo.com
Wed Dec 13 08:16:13 EST 2000
"Christophe Prevost" <ommadawn at club-internet.fr> wrote in message
news:917pjb$ii2$1 at reader1.imaginet.fr...
> Hi,
>
> I need locale for my re in french. And there's something strange...
>
> import locale
> this work ->
> >>>locale.setlocale(locale.LC_ALL, "")
> >>>locale.getdefaultlocale()
> ('fr_FR', 'cp1252')
>
> this doesn't work ->
> >>>locale.setlocale(locale.LC_ALL, "fr_FR")
>
> Tell me Why?
Because the string 'fr_FR' is not a valid
locale descriptor.
>>> locale.setlocale(locale.LC_ALL, "French_France.1252")
This will work.
I'm not sure what, exactly, .getdefaultlocale() is
returning -- I can't find this function in the docs...
Alex
More information about the Python-list
mailing list