Marc-Andre Lemburg added the comment: 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' ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue5815> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com