[issue10466] locale.py resetlocale throws exception on Windows (getdefaultlocale returns value not usable in setlocale)

2019-09-11 Thread Steve Dower
Steve Dower added the comment: issue37945 is a duplicate and has more up-to-date information on it, so I'm going to close this one even though it's older. -- resolution: -> duplicate stage: -> resolved status: open -> closed superseder: -> test_locale failing _

[issue10466] locale.py resetlocale throws exception on Windows (getdefaultlocale returns value not usable in setlocale)

2019-08-23 Thread Vidar Fauske
Vidar Fauske added the comment: Note that this is still an issue on Windows: >>> import locale >>> locale.getdefaultlocale() ('en_US', 'cp1252') >>> locale.setlocale(locale.getdefaultlocale()) Error: unsupported locale setting -- components: +Windows nosy: +paul.moore, steve.dower, vi

[issue10466] locale.py resetlocale throws exception on Windows (getdefaultlocale returns value not usable in setlocale)

2015-08-25 Thread Gabi Davar
Changes by Gabi Davar : -- nosy: +Gabi.Davar ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue10466] locale.py resetlocale throws exception on Windows (getdefaultlocale returns value not usable in setlocale)

2014-06-12 Thread R. David Murray
R. David Murray added the comment: Oh, I see I'd already previously opened issue 10498 for that. -- ___ Python tracker ___ ___ Python-

[issue10466] locale.py resetlocale throws exception on Windows (getdefaultlocale returns value not usable in setlocale)

2014-06-12 Thread R. David Murray
R. David Murray added the comment: See issue 21731 for considering putting a workaround for this into the calendar module (noted here because of msg122065). -- ___ Python tracker __

[issue10466] locale.py resetlocale throws exception on Windows (getdefaultlocale returns value not usable in setlocale)

2011-05-15 Thread Tim Lyons
Tim Lyons added the comment: Surely the user of getlocale as the right to expect that the same thing (i.e. ISO language codes) would be returned on all platforms. I am looking at some code that provides special purpose date handling routines. The appropriate routine is selected by a language

[issue10466] locale.py resetlocale throws exception on Windows (getdefaultlocale returns value not usable in setlocale)

2011-05-07 Thread Jan Killian
Changes by Jan Killian : -- nosy: +iki ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/m

[issue10466] locale.py resetlocale throws exception on Windows (getdefaultlocale returns value not usable in setlocale)

2010-11-23 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: Marc-Andre Lemburg wrote: > > Marc-Andre Lemburg added the comment: > > R. David Murray wrote: >> >> R. David Murray added the comment: >> >> I had a report from a user on IRC during the bug weekend that they could not >> reproduce the failure on window

[issue10466] locale.py resetlocale throws exception on Windows (getdefaultlocale returns value not usable in setlocale)

2010-11-23 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: R. David Murray wrote: > > R. David Murray added the comment: > > I had a report from a user on IRC during the bug weekend that they could not > reproduce the failure on windows. So it may be dependent on the windows > version. That doesn't answer you

[issue10466] locale.py resetlocale throws exception on Windows (getdefaultlocale returns value not usable in setlocale)

2010-11-22 Thread R. David Murray
R. David Murray added the comment: I had a report from a user on IRC during the bug weekend that they could not reproduce the failure on windows. So it may be dependent on the windows version. That doesn't answer your question of why it hasn't come up before, though, since my tests were don

[issue10466] locale.py resetlocale throws exception on Windows (getdefaultlocale returns value not usable in setlocale)

2010-11-22 Thread Marc-Andre Lemburg
Marc-Andre Lemburg 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

[issue10466] locale.py resetlocale throws exception on Windows (getdefaultlocale returns value not usable in setlocale)

2010-11-21 Thread Ned Deily
Ned Deily added the comment: FYI, calendar.localeHTMLCalendar() fails on OS X in exactly the same way for exactly the same reason. See, for instance, Issue10090. -- nosy: +ned.deily ___ Python tracker __

[issue10466] locale.py resetlocale throws exception on Windows (getdefaultlocale returns value not usable in setlocale)

2010-11-21 Thread R. David Murray
R. David Murray added the comment: I've opened issue 10498 for the calendar bug. -- ___ Python tracker ___ ___ Python-bugs-list maili

[issue10466] locale.py resetlocale throws exception on Windows (getdefaultlocale returns value not usable in setlocale)

2010-11-21 Thread R. David Murray
R. David Murray 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 getdefau

[issue10466] locale.py resetlocale throws exception on Windows

2010-11-21 Thread Sibylle Koczian
Sibylle Koczian added the comment: Am 21.11.2010 20:04, schrieb R. David Murray: > > R. David Murray added the comment: > > Given the long standing nature of this issue, it seems that the > priority isn't very high, especially since the bug is revealed not by > user code but by a diagnostic rou

[issue10466] locale.py resetlocale throws exception on Windows

2010-11-21 Thread R. David Murray
R. David Murray added the comment: See also issue 1699853. The problem here is that resetlocale calls getdefaultlocale, and getdefaultlocale returns something that setlocale cannot consume on Windows. For example, on my US windows system, getlocale returns ('English_United States', '1252'),