Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Probleme with locale

0 views
Skip to first unread message

Christophe Prevost

unread,
Dec 13, 2000, 8:21:26 AM12/13/00
to
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?

Alex Martelli

unread,
Dec 13, 2000, 8:16:13 AM12/13/00
to
"Christophe Prevost" <omma...@club-internet.fr> wrote in message
news:917pjb$ii2$1...@reader1.imaginet.fr...

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

Christophe Prevost

unread,
Dec 13, 2000, 10:56:13 AM12/13/00
to
"Alex Martelli" <ale...@yahoo.com> a écrit dans le message news:
917sr...@news2.newsguy.com...

> > this doesn't work ->
> > >>>locale.setlocale(locale.LC_ALL, "fr_FR")

> Because the string 'fr_FR' is not a valid
> locale descriptor.
> >>> locale.setlocale(locale.LC_ALL, "French_France.1252")

Thanks!


0 new messages