Marc-Andre Lemburg <m...@egenix.com> added the comment:

I think that's a bug in the resetlocale() API.

The correct way to reset the locale setting to defaults, it to use

setlocale(category, "")

The other issues here is that getlocale() appears to return non-ISO language 
codes on Windows. If that's indeed the case, then we would need to add mappings 
of the Windows codes to the ISO ones and use a reverse mappings to make 
setlocale() work with the ISO codes.

Perhaps it's easier to just update the mapping used by getdefaultencoding() to 
return the non-ISO codes used by Windows and then update the documentation to 
say that on Windows, non-ISO codes are returned.

BTW: I wonder why this hasn't popped up earlier.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue10466>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to