[issue5815] locale.getdefaultlocale() missing corner case
Mike FABIAN
report at bugs.python.org
Sun Nov 10 19:32:52 CET 2013
Mike FABIAN added the comment:
Serhiy, in your patch you seem to have special treatment for
the devanagari modifier:
+ # Devanagari modifier placed before encoding.
+ return code, modifier.split('.')[1]
Probably because of
'ks_in at devanagari': 'ks_IN at devanagari.UTF-8',
'sd': 'sd_IN at devanagari.UTF-8',
in the locale_alias dictionary.
But I think these two lines are just wrong, this mistake
is inherited from the locale.alias from X.org where the
python locale_alias comes from.
glibc:
mfabian at ari:~
$ locale -a | grep ^sd
sd_IN
sd_IN.utf8
sd_IN.utf8 at devanagari
sd_IN at devanagari
mfabian at ari:~
$ locale -a | grep ^ks
ks_IN
ks_IN.utf8
ks_IN.utf8 at devanagari
ks_IN at devanagari
mfabian at ari:~
$
The encoding should always be *before* the modifier.
----------
nosy: +mfabian
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5815>
_______________________________________
More information about the Python-bugs-list
mailing list