[issue1443504] locale.getpreferredencoding() dies when setlocale fails
"Martin v. Löwis" <report@bugs.python.org> at psf.upfronthosting.co.za
"Martin v. Löwis" <report@bugs.python.org> at psf.upfronthosting.co.za
Fri May 1 22:24:45 CEST 2009
Martin v. Löwis <martin at v.loewis.de> added the comment:
> But I am curious about your thoughts about the _parse_localename()
> method being called from setlocale() raising a ValueError, whereas a
> setlocale(LC_CTYPE, "") should not fail at all, which it currently does
> if the locale in the environment is not valid.
I fail to see how this is related to this issue. In the OP's report,
the exception was locale.Error, not ValueError, and _parse_localename
isn't ever being called from setlocale() - why do you think it is being
called? AFAICT, the only callers of _parse_localename are getlocale and
getdefaultlocale (which, IMO, should both be deprecated).
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue1443504>
_______________________________________
More information about the Python-bugs-list
mailing list