R. David Murray <rdmur...@bitdance.com> added the comment:

It is unfunny that your program fails on Windows.

Yes it is the same bug, since calendar calls getdefaultlocale.

Issue 1080864 makes very interesting reading in this context.  Clearly Martin 
is right, yet the OP seems to find the current behavior of getdefaultencoding 
(returning the more standard locale name rather than Windows unique values) 
useful.

It is an interesting question what can be done about this.  Clearly resetlocale 
is non-functional on Windows, and getdefaultlocale is of questionable utility.  
At the very least these limitations need to be documented.

Your application bug, however, can probably be addressed by fixing calendar to 
not use getdefaultencoding.  We should open a new bug for that, though.

----------
nosy: +loewis
title: locale.py resetlocale throws exception on Windows -> locale.py 
resetlocale throws exception on Windows (getdefaultlocale returns value not 
usable in setlocale)

_______________________________________
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