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 Dmitry.Jemerov, georg.brandl, groodt, lemburg, loewis, r.david.murray, rg3, serhiy.storchaka
Date 2013-09-13.15:18:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <52332CCB.4040501@egenix.com>
In-reply-to <1379082876.95.0.661262699212.issue5815@psf.upfronthosting.co.za>
Content
On 13.09.2013 16:34, Serhiy Storchaka wrote:
> 
> Serhiy Storchaka added the comment:
> 
>> Could you elaborate on the alias changes ?
>> Were those coming from an updated X11 local.alias file ?
> 
> No, they are not from X11 local.alias file. They are a result of the test_locale_alias self-test, I have fixed all failures.
> 
> This test can't be backported without rest of changes, because they fix other error, for example processing encodings with hyphen. Without them test_locale_alias will fail even with updated locale_alias. I.e. we can backport either changes to locale_alias without tests, or changes to locale_alias with all changes to parser and tests, or changes to parser and all tests except test_locale_alias.
> 
> Current code doesn't work with locales with modifiers and locales with hyphenated encodings.

Then I don't understand changes such as:

-    'chinese-s':                            'zh_CN.eucCN',
+    'chinese-s':                            'zh_CN.gb2312',

or

-    'sp':                                   'sr_CS.ISO8859-5',
-    'sp_yu':                                'sr_CS.ISO8859-5',
+    'sp':                                   'sr_RS.ISO8859-5',
+    'sp_yu':                                'sr_RS.ISO8859-5',

The .test_locale_alias() checks that the normalize()
function returns the the alias given in the alias table.

If you have to make changes to the alias table that cause the
encoding to or locale to change, something is wrong with
normalize() function.

Note that we are using the X11 locale.alias file as basis for
the mapping, so any such changes need to be found there as
well.

The Tools/i18n/makelocalealias.py script can be used to create
an updated listing.

Please remember that the output of the alias table
is a C runtime locale string. Those do not necessarily
use the same encodings as we do in Python.

Perhaps we should open a separate ticket for the update of the
alias table. I just ran the script on my older dev system
and it returned this list of changes compared to what's in
Python 2.7:

#    added 'ar_in'
#    added 'as_in'
#    added 'be_bg'
#    added 'bo_in'
#    added 'en_dk'
#    added 'hne_in'
#    added 'ks_in'
#    added 'mai_in'
#    added 'ml_in'
#    added 'ne_np'
#    added 'or_in'
#    added 'pa_pk'
#    added 'sd_in'
#    added 'sd_in@devanagari'
#    added 'te_in'
#    updated 'univ' -> 'en_US.utf' to 'en_US.UTF-8'
#    added 'ur_in'
#    added 'zh_sg'
History
Date User Action Args
2013-09-13 15:18:42lemburgsetrecipients: + lemburg, loewis, georg.brandl, r.david.murray, rg3, Dmitry.Jemerov, serhiy.storchaka, groodt
2013-09-13 15:18:42lemburglinkissue5815 messages
2013-09-13 15:18:42lemburgcreate