Marc-Andre Lemburg added the comment: On 20.12.2013 16:24, Serhiy Storchaka wrote: > > Serhiy Storchaka added the comment: > >> Well, yes, but only because you are removing the @-modifiers. I don't >> think that's correct, since e.g. the string formatting used for >> numbers is different with the modifier. > > All the @-modifiers except euro are applied to the locale, not the encoding. > And Python removes all the @-modifiers, e.g. latin and cyrillic which specify > the script.
That's not quite correct. The modifiers are used to determine the correct mapping, so you'll often find them on the left side, but not necessarily on the right side. There are several cases where the modifiers are kept around, since they have implications on the way number or dates are formatted. For the Indian "devanagari" locales we have to keep them, because the locale formatting of number and dates depends on them. >> If you keep the modifiers, but move them to the end of the locale >> string you should get the correct behavior, e.g. >> >> - 'sd': 'sd...@devanagari.utf-8', >> + 'sd': 'sd_IN.UTF-8@devanagari', >> >> (modulo perhaps the spelling of "UTF-8") > > Recent the locale.alias file changes these entities: > > sd: sd_IN.UTF-8 > sd_IN.utf8: sd_IN.UTF-8 > sd@devanagari: sd...@devanagari.utf-8 > sd_IN@devanagari: sd...@devanagari.utf-8 > sd_IN@devanagari.utf8: sd...@devanagari.utf-8 I'm not sure I can parse this comment :-) Looking at issue20034 I think we are saying that the new updated local.alias file contains these entries: sd: sd_IN.UTF-8 sd_IN.utf8: sd_IN.UTF-8 sd@devanagari: sd...@devanagari.utf-8 sd_IN@devanagari: sd...@devanagari.utf-8 sd_IN@devanagari.utf8: sd...@devanagari.utf-8 So my example is wrong with the new locale.alias file. Instead, sd will map directly to sd_IN.UTF-8. Still, I think the makelocalalias.py script should correct the non-standard locale names from sd...@devanagari.utf-8 to sd_IN.UTF-8@devanagari in order to match the output of "locale -a". ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue20027> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com