This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author lemburg
Recipients lemburg, loewis, serhiy.storchaka
Date 2013-12-20.16:03:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <52B46A59.2060609@egenix.com>
In-reply-to <1781450.QVIuIuhGfQ@raxxla>
Content
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_IN@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_IN@devanagari.UTF-8
> sd_IN@devanagari:				sd_IN@devanagari.UTF-8
> sd_IN@devanagari.utf8:				sd_IN@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_IN@devanagari.UTF-8
sd_IN@devanagari:				sd_IN@devanagari.UTF-8
sd_IN@devanagari.utf8:				sd_IN@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_IN@devanagari.UTF-8
to sd_IN.UTF-8@devanagari in order to match the output
of "locale -a".
History
Date User Action Args
2013-12-20 16:03:47lemburgsetrecipients: + lemburg, loewis, serhiy.storchaka
2013-12-20 16:03:47lemburglinkissue20027 messages
2013-12-20 16:03:46lemburgcreate