questions about locale and Windows

M

Manlio Perillo

Regards.

I have a few questions about locale handling on Windows.

The first: why getlocale() returns (None, None) when the locale is 'C'?

The second is: why this code fails?:

Traceback (most recent call last):
File "<pyshell#15>", line 1, in -toplevel-
locale.setlocale(locale.LC_ALL, (loc, enc))
File "C:\Python2.4\lib\locale.py", line 381, in setlocale
return _setlocale(category, locale)
Error: unsupported locale setting


Fortunately'Italian_Italy.1252'

and
locale.setlocale(locale.LC_ALL)
'C'

works...



Thanks Manlio Perillo
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,968
Messages
2,570,150
Members
46,696
Latest member
BarbraOLog

Latest Threads

Top