diff options
-rw-r--r-- | Lib/locale.py | 146 | ||||
-rw-r--r-- | Lib/test/test_locale.py | 5 | ||||
-rw-r--r-- | Misc/NEWS | 2 | ||||
-rwxr-xr-x | Tools/i18n/makelocalealias.py | 2 |
4 files changed, 112 insertions, 43 deletions
diff --git a/Lib/locale.py b/Lib/locale.py index f8d1d78..582a582 100644 --- a/Lib/locale.py +++ b/Lib/locale.py @@ -834,6 +834,47 @@ for k, v in sorted(locale_encoding_alias.items()): # # SS 2014-10-01: # Updated alias mapping with glibc 2.19 supported locales. +# +# BP 2017-03-02 +# Updated alias mapping with glibc 2.24 supported locales. Prefer glibc locale +# aliases to X11 ones. +# +# updated 'az_az' -> 'az_AZ.ISO8859-9E' to 'az_AZ.UTF-8' +# updated 'ca_ad' -> 'ca_AD.ISO8859-1' to 'ca_AD.ISO8859-15' +# updated 'ca_fr' -> 'ca_FR.ISO8859-1' to 'ca_FR.ISO8859-15' +# updated 'ca_it' -> 'ca_IT.ISO8859-1' to 'ca_IT.ISO8859-15' +# updated 'cy_gb' -> 'cy_GB.ISO8859-1' to 'cy_GB.ISO8859-14' +# updated 'en_in' -> 'en_IN.ISO8859-1' to 'en_IN.UTF-8' +# updated 'eo' -> 'eo_XX.ISO8859-3' to 'eo.UTF-8' +# updated 'et_ee' -> 'et_EE.ISO8859-15' to 'et_EE.ISO8859-1' +# updated 'fi_fi' -> 'fi_FI.ISO8859-15' to 'fi_FI.ISO8859-1' +# updated 'gd_gb' -> 'gd_GB.ISO8859-1' to 'gd_GB.ISO8859-15' +# updated 'hi_in' -> 'hi_IN.ISCII-DEV' to 'hi_IN.UTF-8' +# updated 'iu_ca' -> 'iu_CA.NUNACOM-8' to 'iu_CA.UTF-8' +# updated 'ka_ge' -> 'ka_GE.GEORGIAN-ACADEMY' to 'ka_GE.GEORGIAN_PS' +# updated 'lo_la' -> 'lo_LA.MULELAO-1' to 'lo_LA.UTF-8' +# updated 'mi_nz' -> 'mi_NZ.ISO8859-1' to 'mi_NZ.ISO8859-13' +# updated 'nr_za' -> 'nr_ZA.ISO8859-1' to 'nr_ZA.UTF-8' +# updated 'nso_za' -> 'nso_ZA.ISO8859-15' to 'nso_ZA.UTF-8' +# updated 'ru_ru' -> 'ru_RU.UTF-8' to 'ru_RU.ISO8859-5' +# updated 'russian' -> 'ru_RU.ISO8859-5' to 'ru_RU.KOI8-R' +# updated 'rw_rw' -> 'rw_RW.ISO8859-1' to 'rw_RW.UTF-8' +# updated 'sq_al' -> 'sq_AL.ISO8859-2' to 'sq_AL.ISO8859-1' +# updated 'ss_za' -> 'ss_ZA.ISO8859-1' to 'ss_ZA.UTF-8' +# updated 'ta_in' -> 'ta_IN.TSCII-0' to 'ta_IN.UTF-8' +# updated 'tg_tj' -> 'tg_TJ.KOI8-C' to 'tg_TJ.KOI8-T' +# updated 'th_th' -> 'th_TH.ISO8859-11' to 'th_TH.TIS_620' +# updated 'tn_za' -> 'tn_ZA.ISO8859-15' to 'tn_ZA.UTF-8' +# updated 'ts_za' -> 'ts_ZA.ISO8859-1' to 'ts_ZA.UTF-8' +# updated 'tt_ru' -> 'tt_RU.TATAR-CYR' to 'tt_RU.UTF-8' +# updated 'ur_pk' -> 'ur_PK.CP1256' to 'ur_PK.UTF-8' +# updated 'uz_uz' -> 'uz_UZ.UTF-8' to 'uz_UZ.ISO8859-1' +# updated 'uz_uz@cyrillic' -> 'uz_UZ.UTF-8' to 'uz_UZ.UTF-8@cyrillic' +# updated 'vi_vn' -> 'vi_VN.TCVN' to 'vi_VN.UTF-8' +# updated 'zh_cn' -> 'zh_CN.gb2312' to 'zh_CN.GB2312' +# updated 'zh_tw' -> 'zh_TW.big5' to 'zh_TW.BIG5' +# updated 'zh_tw.euctw' -> 'zh_TW.eucTW' to 'zh_TW.EUC_TW' +# locale_alias = { 'a3': 'az_AZ.KOI8-C', @@ -844,10 +885,12 @@ locale_alias = { 'aa_et': 'aa_ET.UTF-8', 'af': 'af_ZA.ISO8859-1', 'af_za': 'af_ZA.ISO8859-1', + 'ak_gh': 'ak_GH.UTF-8', 'am': 'am_ET.UTF-8', 'am_et': 'am_ET.UTF-8', 'american': 'en_US.ISO8859-1', 'an_es': 'an_ES.ISO8859-15', + 'anp_in': 'anp_IN.UTF-8', 'ar': 'ar_AA.ISO8859-6', 'ar_aa': 'ar_AA.ISO8859-6', 'ar_ae': 'ar_AE.ISO8859-6', @@ -865,6 +908,7 @@ locale_alias = { 'ar_qa': 'ar_QA.ISO8859-6', 'ar_sa': 'ar_SA.ISO8859-6', 'ar_sd': 'ar_SD.ISO8859-6', + 'ar_ss': 'ar_SS.UTF-8', 'ar_sy': 'ar_SY.ISO8859-6', 'ar_tn': 'ar_TN.ISO8859-6', 'ar_ye': 'ar_YE.ISO8859-6', @@ -874,7 +918,7 @@ locale_alias = { 'ast_es': 'ast_ES.ISO8859-15', 'ayc_pe': 'ayc_PE.UTF-8', 'az': 'az_AZ.ISO8859-9E', - 'az_az': 'az_AZ.ISO8859-9E', + 'az_az': 'az_AZ.UTF-8', 'az_az.iso88599e': 'az_AZ.ISO8859-9E', 'be': 'be_BY.CP1251', 'be@latin': 'be_BY.UTF-8@latin', @@ -886,6 +930,7 @@ locale_alias = { 'ber_ma': 'ber_MA.UTF-8', 'bg': 'bg_BG.CP1251', 'bg_bg': 'bg_BG.CP1251', + 'bhb_in.utf8': 'bhb_IN.UTF-8', 'bho_in': 'bho_IN.UTF-8', 'bn_bd': 'bn_BD.UTF-8', 'bn_in': 'bn_IN.UTF-8', @@ -893,6 +938,7 @@ locale_alias = { 'bo_in': 'bo_IN.UTF-8', 'bokmal': 'nb_NO.ISO8859-1', 'bokm\xe5l': 'nb_NO.ISO8859-1', + 'bokm\xef\xbf\xbd': 'nb_NO.ISO8859-1', 'br': 'br_FR.ISO8859-1', 'br_fr': 'br_FR.ISO8859-1', 'brx_in': 'brx_IN.UTF-8', @@ -909,15 +955,19 @@ locale_alias = { 'c_c': 'C', 'c_c.c': 'C', 'ca': 'ca_ES.ISO8859-1', - 'ca_ad': 'ca_AD.ISO8859-1', + 'ca_ad': 'ca_AD.ISO8859-15', 'ca_es': 'ca_ES.ISO8859-1', 'ca_es@valencia': 'ca_ES.ISO8859-15@valencia', - 'ca_fr': 'ca_FR.ISO8859-1', - 'ca_it': 'ca_IT.ISO8859-1', + 'ca_fr': 'ca_FR.ISO8859-15', + 'ca_it': 'ca_IT.ISO8859-15', 'catalan': 'ca_ES.ISO8859-1', + 'ce_ru': 'ce_RU.UTF-8', 'cextend': 'en_US.ISO8859-1', 'chinese-s': 'zh_CN.eucCN', 'chinese-t': 'zh_TW.eucTW', + 'chr_us': 'chr_US.UTF-8', + 'ckb_iq': 'ckb_IQ.UTF-8', + 'cmn_tw': 'cmn_TW.UTF-8', 'crh_ua': 'crh_UA.UTF-8', 'croatian': 'hr_HR.ISO8859-2', 'cs': 'cs_CZ.ISO8859-2', @@ -926,7 +976,7 @@ locale_alias = { 'csb_pl': 'csb_PL.UTF-8', 'cv_ru': 'cv_RU.UTF-8', 'cy': 'cy_GB.ISO8859-1', - 'cy_gb': 'cy_GB.ISO8859-1', + 'cy_gb': 'cy_GB.ISO8859-14', 'cz': 'cs_CZ.ISO8859-2', 'cz_cz': 'cs_CZ.ISO8859-2', 'czech': 'cs_CZ.ISO8859-2', @@ -939,6 +989,7 @@ locale_alias = { 'de_be': 'de_BE.ISO8859-1', 'de_ch': 'de_CH.ISO8859-1', 'de_de': 'de_DE.ISO8859-1', + 'de_it': 'de_IT.ISO8859-1', 'de_li.utf8': 'de_LI.UTF-8', 'de_lu': 'de_LU.ISO8859-1', 'deutsch': 'de_DE.ISO8859-1', @@ -965,7 +1016,8 @@ locale_alias = { 'en_gb': 'en_GB.ISO8859-1', 'en_hk': 'en_HK.ISO8859-1', 'en_ie': 'en_IE.ISO8859-1', - 'en_in': 'en_IN.ISO8859-1', + 'en_il': 'en_IL.UTF-8', + 'en_in': 'en_IN.UTF-8', 'en_ng': 'en_NG.UTF-8', 'en_nz': 'en_NZ.ISO8859-1', 'en_ph': 'en_PH.ISO8859-1', @@ -976,15 +1028,14 @@ locale_alias = { 'en_za': 'en_ZA.ISO8859-1', 'en_zm': 'en_ZM.UTF-8', 'en_zw': 'en_ZW.ISO8859-1', - 'en_zw.utf8': 'en_ZS.UTF-8', 'eng_gb': 'en_GB.ISO8859-1', 'english': 'en_EN.ISO8859-1', + 'english.iso88591': 'en_US.ISO8859-1', 'english_uk': 'en_GB.ISO8859-1', 'english_united-states': 'en_US.ISO8859-1', 'english_united-states.437': 'C', 'english_us': 'en_US.ISO8859-1', - 'eo': 'eo_XX.ISO8859-3', - 'eo.utf8': 'eo.UTF-8', + 'eo': 'eo.UTF-8', 'eo_eo': 'eo_EO.ISO8859-3', 'eo_us.utf8': 'eo_US.UTF-8', 'eo_xx': 'eo_XX.ISO8859-3', @@ -1012,7 +1063,7 @@ locale_alias = { 'es_ve': 'es_VE.ISO8859-1', 'estonian': 'et_EE.ISO8859-1', 'et': 'et_EE.ISO8859-15', - 'et_ee': 'et_EE.ISO8859-15', + 'et_ee': 'et_EE.ISO8859-1', 'eu': 'eu_ES.ISO8859-1', 'eu_es': 'eu_ES.ISO8859-1', 'eu_fr': 'eu_FR.ISO8859-1', @@ -1021,7 +1072,7 @@ locale_alias = { 'fa_ir.isiri3342': 'fa_IR.ISIRI-3342', 'ff_sn': 'ff_SN.UTF-8', 'fi': 'fi_FI.ISO8859-15', - 'fi_fi': 'fi_FI.ISO8859-15', + 'fi_fi': 'fi_FI.ISO8859-1', 'fil_ph': 'fil_PH.UTF-8', 'finnish': 'fi_FI.ISO8859-1', 'fo': 'fo_FO.ISO8859-1', @@ -1033,6 +1084,7 @@ locale_alias = { 'fr_fr': 'fr_FR.ISO8859-1', 'fr_lu': 'fr_LU.ISO8859-1', 'fran\xe7ais': 'fr_FR.ISO8859-1', + 'fran\xef\xbf\xbdis': 'fr_FR.ISO8859-1', 'fre_fr': 'fr_FR.ISO8859-1', 'french': 'fr_FR.ISO8859-1', 'french.iso88591': 'fr_CH.ISO8859-1', @@ -1045,7 +1097,7 @@ locale_alias = { 'galego': 'gl_ES.ISO8859-1', 'galician': 'gl_ES.ISO8859-1', 'gd': 'gd_GB.ISO8859-1', - 'gd_gb': 'gd_GB.ISO8859-1', + 'gd_gb': 'gd_GB.ISO8859-15', 'ger_de': 'de_DE.ISO8859-1', 'german': 'de_DE.ISO8859-1', 'german.iso88591': 'de_CH.ISO8859-1', @@ -1059,11 +1111,12 @@ locale_alias = { 'gv': 'gv_GB.ISO8859-1', 'gv_gb': 'gv_GB.ISO8859-1', 'ha_ng': 'ha_NG.UTF-8', + 'hak_tw': 'hak_TW.UTF-8', 'he': 'he_IL.ISO8859-8', 'he_il': 'he_IL.ISO8859-8', 'hebrew': 'he_IL.ISO8859-8', 'hi': 'hi_IN.ISCII-DEV', - 'hi_in': 'hi_IN.ISCII-DEV', + 'hi_in': 'hi_IN.UTF-8', 'hi_in.isciidev': 'hi_IN.ISCII-DEV', 'hne': 'hne_IN.UTF-8', 'hne_in': 'hne_IN.UTF-8', @@ -1099,7 +1152,7 @@ locale_alias = { 'it_it': 'it_IT.ISO8859-1', 'italian': 'it_IT.ISO8859-1', 'iu': 'iu_CA.NUNACOM-8', - 'iu_ca': 'iu_CA.NUNACOM-8', + 'iu_ca': 'iu_CA.UTF-8', 'iu_ca.nunacom8': 'iu_CA.NUNACOM-8', 'iw': 'he_IL.ISO8859-8', 'iw_il': 'he_IL.ISO8859-8', @@ -1115,7 +1168,7 @@ locale_alias = { 'japanese.euc': 'ja_JP.eucJP', 'jp_jp': 'ja_JP.eucJP', 'ka': 'ka_GE.GEORGIAN-ACADEMY', - 'ka_ge': 'ka_GE.GEORGIAN-ACADEMY', + 'ka_ge': 'ka_GE.GEORGIAN_PS', 'ka_ge.georgianacademy': 'ka_GE.GEORGIAN-ACADEMY', 'ka_ge.georgianps': 'ka_GE.GEORGIAN-PS', 'ka_ge.georgianrs': 'ka_GE.GEORGIAN-ACADEMY', @@ -1145,8 +1198,9 @@ locale_alias = { 'li_nl': 'li_NL.UTF-8', 'lij_it': 'lij_IT.UTF-8', 'lithuanian': 'lt_LT.ISO8859-13', + 'ln_cd': 'ln_CD.UTF-8', 'lo': 'lo_LA.MULELAO-1', - 'lo_la': 'lo_LA.MULELAO-1', + 'lo_la': 'lo_LA.UTF-8', 'lo_la.cp1133': 'lo_LA.IBM-CP1133', 'lo_la.ibmcp1133': 'lo_LA.IBM-CP1133', 'lo_la.mulelao1': 'lo_LA.MULELAO-1', @@ -1154,13 +1208,14 @@ locale_alias = { 'lt_lt': 'lt_LT.ISO8859-13', 'lv': 'lv_LV.ISO8859-13', 'lv_lv': 'lv_LV.ISO8859-13', + 'lzh_tw': 'lzh_TW.UTF-8', 'mag_in': 'mag_IN.UTF-8', 'mai': 'mai_IN.UTF-8', 'mai_in': 'mai_IN.UTF-8', 'mg_mg': 'mg_MG.ISO8859-15', 'mhr_ru': 'mhr_RU.UTF-8', 'mi': 'mi_NZ.ISO8859-1', - 'mi_nz': 'mi_NZ.ISO8859-1', + 'mi_nz': 'mi_NZ.ISO8859-13', 'mk': 'mk_MK.ISO8859-5', 'mk_mk': 'mk_MK.ISO8859-5', 'ml': 'ml_IN.UTF-8', @@ -1174,7 +1229,7 @@ locale_alias = { 'mt': 'mt_MT.ISO8859-3', 'mt_mt': 'mt_MT.ISO8859-3', 'my_mm': 'my_MM.UTF-8', - 'nan_tw@latin': 'nan_TW.UTF-8@latin', + 'nan_tw': 'nan_TW.UTF-8', 'nb': 'nb_NO.ISO8859-1', 'nb_no': 'nb_NO.ISO8859-1', 'nds_de': 'nds_DE.UTF-8', @@ -1196,9 +1251,9 @@ locale_alias = { 'no_no.iso88591@nynorsk': 'no_NO.ISO8859-1', 'norwegian': 'no_NO.ISO8859-1', 'nr': 'nr_ZA.ISO8859-1', - 'nr_za': 'nr_ZA.ISO8859-1', + 'nr_za': 'nr_ZA.UTF-8', 'nso': 'nso_ZA.ISO8859-15', - 'nso_za': 'nso_ZA.ISO8859-15', + 'nso_za': 'nso_ZA.UTF-8', 'ny': 'ny_NO.ISO8859-1', 'ny_no': 'ny_NO.ISO8859-1', 'nynorsk': 'nn_NO.ISO8859-1', @@ -1213,6 +1268,8 @@ locale_alias = { 'pa_in': 'pa_IN.UTF-8', 'pa_pk': 'pa_PK.UTF-8', 'pap_an': 'pap_AN.UTF-8', + 'pap_aw': 'pap_AW.UTF-8', + 'pap_cw': 'pap_CW.UTF-8', 'pd': 'pd_US.ISO8859-1', 'pd_de': 'pd_DE.ISO8859-1', 'pd_us': 'pd_US.ISO8859-1', @@ -1231,16 +1288,18 @@ locale_alias = { 'pt': 'pt_PT.ISO8859-1', 'pt_br': 'pt_BR.ISO8859-1', 'pt_pt': 'pt_PT.ISO8859-1', + 'quz_pe': 'quz_PE.UTF-8', + 'raj_in': 'raj_IN.UTF-8', 'ro': 'ro_RO.ISO8859-2', 'ro_ro': 'ro_RO.ISO8859-2', 'romanian': 'ro_RO.ISO8859-2', 'ru': 'ru_RU.UTF-8', - 'ru_ru': 'ru_RU.UTF-8', + 'ru_ru': 'ru_RU.ISO8859-5', 'ru_ua': 'ru_UA.KOI8-U', 'rumanian': 'ro_RO.ISO8859-2', - 'russian': 'ru_RU.ISO8859-5', + 'russian': 'ru_RU.KOI8-R', 'rw': 'rw_RW.ISO8859-1', - 'rw_rw': 'rw_RW.ISO8859-1', + 'rw_rw': 'rw_RW.UTF-8', 'sa_in': 'sa_IN.UTF-8', 'sat_in': 'sat_IN.UTF-8', 'sc_it': 'sc_IT.UTF-8', @@ -1250,6 +1309,7 @@ locale_alias = { 'sd_pk': 'sd_PK.UTF-8', 'se_no': 'se_NO.UTF-8', 'serbocroatian': 'sr_RS.UTF-8@latin', + 'sgs_lt': 'sgs_LT.UTF-8', 'sh': 'sr_RS.UTF-8@latin', 'sh_ba.iso88592@bosnia': 'sr_CS.ISO8859-2', 'sh_hr': 'sh_HR.ISO8859-2', @@ -1278,7 +1338,7 @@ locale_alias = { 'spanish': 'es_ES.ISO8859-1', 'spanish_spain': 'es_ES.ISO8859-1', 'sq': 'sq_AL.ISO8859-2', - 'sq_al': 'sq_AL.ISO8859-2', + 'sq_al': 'sq_AL.ISO8859-1', 'sq_mk': 'sq_MK.UTF-8', 'sr': 'sr_RS.UTF-8', 'sr@cyrillic': 'sr_RS.UTF-8', @@ -1300,7 +1360,7 @@ locale_alias = { 'sr_yu.utf8@cyrillic': 'sr_RS.UTF-8', 'sr_yu@cyrillic': 'sr_RS.UTF-8', 'ss': 'ss_ZA.ISO8859-1', - 'ss_za': 'ss_ZA.ISO8859-1', + 'ss_za': 'ss_ZA.UTF-8', 'st': 'st_ZA.ISO8859-1', 'st_za': 'st_ZA.ISO8859-1', 'sv': 'sv_SE.ISO8859-1', @@ -1311,19 +1371,21 @@ locale_alias = { 'swedish': 'sv_SE.ISO8859-1', 'szl_pl': 'szl_PL.UTF-8', 'ta': 'ta_IN.TSCII-0', - 'ta_in': 'ta_IN.TSCII-0', + 'ta_in': 'ta_IN.UTF-8', 'ta_in.tscii': 'ta_IN.TSCII-0', 'ta_in.tscii0': 'ta_IN.TSCII-0', 'ta_lk': 'ta_LK.UTF-8', + 'tcy_in.utf8': 'tcy_IN.UTF-8', 'te': 'te_IN.UTF-8', 'te_in': 'te_IN.UTF-8', 'tg': 'tg_TJ.KOI8-C', - 'tg_tj': 'tg_TJ.KOI8-C', + 'tg_tj': 'tg_TJ.KOI8-T', 'th': 'th_TH.ISO8859-11', - 'th_th': 'th_TH.ISO8859-11', + 'th_th': 'th_TH.TIS_620', 'th_th.tactis': 'th_TH.TIS620', 'th_th.tis620': 'th_TH.TIS620', 'thai': 'th_TH.ISO8859-11', + 'the_np': 'the_NP.UTF-8', 'ti_er': 'ti_ER.UTF-8', 'ti_et': 'ti_ET.UTF-8', 'tig_er': 'tig_ER.UTF-8', @@ -1331,34 +1393,34 @@ locale_alias = { 'tl': 'tl_PH.ISO8859-1', 'tl_ph': 'tl_PH.ISO8859-1', 'tn': 'tn_ZA.ISO8859-15', - 'tn_za': 'tn_ZA.ISO8859-15', + 'tn_za': 'tn_ZA.UTF-8', 'tr': 'tr_TR.ISO8859-9', 'tr_cy': 'tr_CY.ISO8859-9', 'tr_tr': 'tr_TR.ISO8859-9', 'ts': 'ts_ZA.ISO8859-1', - 'ts_za': 'ts_ZA.ISO8859-1', + 'ts_za': 'ts_ZA.UTF-8', 'tt': 'tt_RU.TATAR-CYR', - 'tt_ru': 'tt_RU.TATAR-CYR', + 'tt_ru': 'tt_RU.UTF-8', 'tt_ru.tatarcyr': 'tt_RU.TATAR-CYR', - 'tt_ru@iqtelif': 'tt_RU.UTF-8@iqtelif', 'turkish': 'tr_TR.ISO8859-9', 'ug_cn': 'ug_CN.UTF-8', 'uk': 'uk_UA.KOI8-U', 'uk_ua': 'uk_UA.KOI8-U', - 'univ': 'en_US.utf', - 'universal': 'en_US.utf', + 'univ': 'en_US.UTF-8', + 'universal': 'en_US.UTF-8', 'universal.utf8@ucs4': 'en_US.UTF-8', 'unm_us': 'unm_US.UTF-8', 'ur': 'ur_PK.CP1256', 'ur_in': 'ur_IN.UTF-8', - 'ur_pk': 'ur_PK.CP1256', + 'ur_pk': 'ur_PK.UTF-8', 'uz': 'uz_UZ.UTF-8', - 'uz_uz': 'uz_UZ.UTF-8', - 'uz_uz@cyrillic': 'uz_UZ.UTF-8', + 'uz_uz': 'uz_UZ.ISO8859-1', + 'uz_uz.utf8@cyrillic': 'uz_UZ.UTF-8', + 'uz_uz@cyrillic': 'uz_UZ.UTF-8@cyrillic', 've': 've_ZA.UTF-8', 've_za': 've_ZA.UTF-8', 'vi': 'vi_VN.TCVN', - 'vi_vn': 'vi_VN.TCVN', + 'vi_vn': 'vi_VN.UTF-8', 'vi_vn.tcvn': 'vi_VN.TCVN', 'vi_vn.tcvn5712': 'vi_VN.TCVN', 'vi_vn.viscii': 'vi_VN.VISCII', @@ -1375,16 +1437,18 @@ locale_alias = { 'yo_ng': 'yo_NG.UTF-8', 'yue_hk': 'yue_HK.UTF-8', 'zh': 'zh_CN.eucCN', - 'zh_cn': 'zh_CN.gb2312', + 'zh_cn': 'zh_CN.GB2312', 'zh_cn.big5': 'zh_TW.big5', 'zh_cn.euc': 'zh_CN.eucCN', + 'zh_cn.gb18030': 'zh_CN.GB18030', + 'zh_cn.gbk': 'zh_CN.GBK', 'zh_hk': 'zh_HK.big5hkscs', 'zh_hk.big5hk': 'zh_HK.big5hkscs', 'zh_sg': 'zh_SG.GB2312', 'zh_sg.gbk': 'zh_SG.GBK', - 'zh_tw': 'zh_TW.big5', + 'zh_tw': 'zh_TW.BIG5', 'zh_tw.euc': 'zh_TW.eucTW', - 'zh_tw.euctw': 'zh_TW.eucTW', + 'zh_tw.euctw': 'zh_TW.EUC_TW', 'zu': 'zu_ZA.ISO8859-1', 'zu_za': 'zu_ZA.ISO8859-1', } diff --git a/Lib/test/test_locale.py b/Lib/test/test_locale.py index 99fab58..2144819 100644 --- a/Lib/test/test_locale.py +++ b/Lib/test/test_locale.py @@ -449,7 +449,7 @@ class NormalizeTest(unittest.TestCase): self.check('ko_kr.euckr', 'ko_KR.eucKR') self.check('zh_cn.euc', 'zh_CN.eucCN') self.check('zh_tw.euc', 'zh_TW.eucTW') - self.check('zh_tw.euctw', 'zh_TW.eucTW') + self.check('zh_tw.euctw', 'zh_TW.EUC_TW') def test_japanese(self): self.check('ja', 'ja_JP.eucJP') @@ -475,6 +475,9 @@ class NormalizeTest(unittest.TestCase): self.check('japanese.sjis', 'ja_JP.SJIS') self.check('jp_jp', 'ja_JP.eucJP') + def test_en_IN(self): + self.check('en_IN', 'en_IN.UTF-8') + class TestMiscellaneous(unittest.TestCase): def test_getpreferredencoding(self): @@ -19,6 +19,8 @@ Core and Builtins - bpo-29695: bool(), float(), list() and tuple() no longer take keyword arguments. The first argument of int() can now be passes only as positional argument. +- bpo-20087: Prefer glibc's list of locale aliases to the X11 ones. + - bpo-28893: Set correct __cause__ for errors about invalid awaitables returned from __aiter__ and __anext__. diff --git a/Tools/i18n/makelocalealias.py b/Tools/i18n/makelocalealias.py index c7ecace..7405e82 100755 --- a/Tools/i18n/makelocalealias.py +++ b/Tools/i18n/makelocalealias.py @@ -135,8 +135,8 @@ if __name__ == '__main__': args = parser.parse_args() data = locale.locale_alias.copy() - data.update(parse_glibc_supported(args.glibc_supported)) data.update(parse(args.locale_alias)) + data.update(parse_glibc_supported(args.glibc_supported)) while True: # Repeat optimization while the size is decreased. n = len(data) |