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

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,066
Latest member
VytoKetoReviews

Latest Threads

Top