Windows locale: default charset

antonmuhin на rambler.ru antonmuhin at rambler.ru
Fri Nov 29 16:18:17 EST 2002


Thanks a lot.


MvL> antonmuhin ia rambler.ru <antonmuhin at rambler.ru> writes:

>> I want to find out default Windows charset to perform
>> encoding/decoding of Unicode strings.
>> 
>> locale module seems of no help---nl_langinfo function that could
>> provide me with needed info isn't included in ActiveState Python 2.2.
>> I found no similar functions in win extensions modules either.
>> 
>> May anybody point me info or snippets?

MvL> On Windows, locale.getlocale()[1] works well (although it does not
MvL> work that well on other systems). In Python 2.3,
MvL> locale.getpreferredencoding will work uniformly on all systems.

MvL> Regards,
MvL> Martin





More information about the Python-list mailing list