[issue5815] locale.getdefaultlocale() missing corner case

rg3 report at bugs.python.org
Wed Apr 22 21:30:43 CEST 2009

rg3 <sarbalap+freshmeat at gmail.com> added the comment:

Further investigation:

The guy who had this issue may be from Valencia, Spain. According to the
manpage for setlocale(3) in my system, the form is usually
language[_territory][.codeset][@modifier]. So, in this case, it would
make sense for the language to be "ca" (Catalan) and territory "ES" (Spain).

My patch may be fine after all. Because, if at that point the @modifier
is still present (I have seen code that removes it before that point),
you'd still want to remove it and keep only the "codeset", which is the
interesting part.


Python tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list