summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2017-03-20 06:49:43 (GMT)
committerGitHub <noreply@github.com>2017-03-20 06:49:43 (GMT)
commitdf8280838f52d6ec45ba03ef734b0dec8a9c43fb (patch)
treede6f73d23e5ef14e39efc77768cfe19e03c60a74
parente46fb8611867fa3b407a813f53137929b7cb4a10 (diff)
downloadcpython-df8280838f52d6ec45ba03ef734b0dec8a9c43fb.zip
cpython-df8280838f52d6ec45ba03ef734b0dec8a9c43fb.tar.gz
cpython-df8280838f52d6ec45ba03ef734b0dec8a9c43fb.tar.bz2
bpo-20087: Revert "make the glibc alias table take precedence over the X11 one (#422)" (#713)
This reverts commit 02371e0ed1ee82ec73e7d363bcf2ed40cde1397a.
-rw-r--r--Lib/locale.py146
-rw-r--r--Lib/test/test_locale.py5
-rw-r--r--Misc/NEWS2
-rwxr-xr-xTools/i18n/makelocalealias.py2
4 files changed, 43 insertions, 112 deletions
diff --git a/Lib/locale.py b/Lib/locale.py
index 582a582..f8d1d78 100644
--- a/Lib/locale.py
+++ b/Lib/locale.py
@@ -834,47 +834,6 @@ 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',
@@ -885,12 +844,10 @@ 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',
@@ -908,7 +865,6 @@ 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',
@@ -918,7 +874,7 @@ locale_alias = {
'ast_es': 'ast_ES.ISO8859-15',
'ayc_pe': 'ayc_PE.UTF-8',
'az': 'az_AZ.ISO8859-9E',
- 'az_az': 'az_AZ.UTF-8',
+ 'az_az': 'az_AZ.ISO8859-9E',
'az_az.iso88599e': 'az_AZ.ISO8859-9E',
'be': 'be_BY.CP1251',
'be@latin': 'be_BY.UTF-8@latin',
@@ -930,7 +886,6 @@ 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',
@@ -938,7 +893,6 @@ 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',
@@ -955,19 +909,15 @@ locale_alias = {
'c_c': 'C',
'c_c.c': 'C',
'ca': 'ca_ES.ISO8859-1',
- 'ca_ad': 'ca_AD.ISO8859-15',
+ 'ca_ad': 'ca_AD.ISO8859-1',
'ca_es': 'ca_ES.ISO8859-1',
'ca_es@valencia': 'ca_ES.ISO8859-15@valencia',
- 'ca_fr': 'ca_FR.ISO8859-15',
- 'ca_it': 'ca_IT.ISO8859-15',
+ 'ca_fr': 'ca_FR.ISO8859-1',
+ 'ca_it': 'ca_IT.ISO8859-1',
'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',
@@ -976,7 +926,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-14',
+ 'cy_gb': 'cy_GB.ISO8859-1',
'cz': 'cs_CZ.ISO8859-2',
'cz_cz': 'cs_CZ.ISO8859-2',
'czech': 'cs_CZ.ISO8859-2',
@@ -989,7 +939,6 @@ 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',
@@ -1016,8 +965,7 @@ locale_alias = {
'en_gb': 'en_GB.ISO8859-1',
'en_hk': 'en_HK.ISO8859-1',
'en_ie': 'en_IE.ISO8859-1',
- 'en_il': 'en_IL.UTF-8',
- 'en_in': 'en_IN.UTF-8',
+ 'en_in': 'en_IN.ISO8859-1',
'en_ng': 'en_NG.UTF-8',
'en_nz': 'en_NZ.ISO8859-1',
'en_ph': 'en_PH.ISO8859-1',
@@ -1028,14 +976,15 @@ 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.UTF-8',
+ 'eo': 'eo_XX.ISO8859-3',
+ 'eo.utf8': 'eo.UTF-8',
'eo_eo': 'eo_EO.ISO8859-3',
'eo_us.utf8': 'eo_US.UTF-8',
'eo_xx': 'eo_XX.ISO8859-3',
@@ -1063,7 +1012,7 @@ locale_alias = {
'es_ve': 'es_VE.ISO8859-1',
'estonian': 'et_EE.ISO8859-1',
'et': 'et_EE.ISO8859-15',
- 'et_ee': 'et_EE.ISO8859-1',
+ 'et_ee': 'et_EE.ISO8859-15',
'eu': 'eu_ES.ISO8859-1',
'eu_es': 'eu_ES.ISO8859-1',
'eu_fr': 'eu_FR.ISO8859-1',
@@ -1072,7 +1021,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-1',
+ 'fi_fi': 'fi_FI.ISO8859-15',
'fil_ph': 'fil_PH.UTF-8',
'finnish': 'fi_FI.ISO8859-1',
'fo': 'fo_FO.ISO8859-1',
@@ -1084,7 +1033,6 @@ 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',
@@ -1097,7 +1045,7 @@ locale_alias = {
'galego': 'gl_ES.ISO8859-1',
'galician': 'gl_ES.ISO8859-1',
'gd': 'gd_GB.ISO8859-1',
- 'gd_gb': 'gd_GB.ISO8859-15',
+ 'gd_gb': 'gd_GB.ISO8859-1',
'ger_de': 'de_DE.ISO8859-1',
'german': 'de_DE.ISO8859-1',
'german.iso88591': 'de_CH.ISO8859-1',
@@ -1111,12 +1059,11 @@ 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.UTF-8',
+ 'hi_in': 'hi_IN.ISCII-DEV',
'hi_in.isciidev': 'hi_IN.ISCII-DEV',
'hne': 'hne_IN.UTF-8',
'hne_in': 'hne_IN.UTF-8',
@@ -1152,7 +1099,7 @@ locale_alias = {
'it_it': 'it_IT.ISO8859-1',
'italian': 'it_IT.ISO8859-1',
'iu': 'iu_CA.NUNACOM-8',
- 'iu_ca': 'iu_CA.UTF-8',
+ 'iu_ca': 'iu_CA.NUNACOM-8',
'iu_ca.nunacom8': 'iu_CA.NUNACOM-8',
'iw': 'he_IL.ISO8859-8',
'iw_il': 'he_IL.ISO8859-8',
@@ -1168,7 +1115,7 @@ locale_alias = {
'japanese.euc': 'ja_JP.eucJP',
'jp_jp': 'ja_JP.eucJP',
'ka': 'ka_GE.GEORGIAN-ACADEMY',
- 'ka_ge': 'ka_GE.GEORGIAN_PS',
+ 'ka_ge': 'ka_GE.GEORGIAN-ACADEMY',
'ka_ge.georgianacademy': 'ka_GE.GEORGIAN-ACADEMY',
'ka_ge.georgianps': 'ka_GE.GEORGIAN-PS',
'ka_ge.georgianrs': 'ka_GE.GEORGIAN-ACADEMY',
@@ -1198,9 +1145,8 @@ 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.UTF-8',
+ 'lo_la': 'lo_LA.MULELAO-1',
'lo_la.cp1133': 'lo_LA.IBM-CP1133',
'lo_la.ibmcp1133': 'lo_LA.IBM-CP1133',
'lo_la.mulelao1': 'lo_LA.MULELAO-1',
@@ -1208,14 +1154,13 @@ 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-13',
+ 'mi_nz': 'mi_NZ.ISO8859-1',
'mk': 'mk_MK.ISO8859-5',
'mk_mk': 'mk_MK.ISO8859-5',
'ml': 'ml_IN.UTF-8',
@@ -1229,7 +1174,7 @@ locale_alias = {
'mt': 'mt_MT.ISO8859-3',
'mt_mt': 'mt_MT.ISO8859-3',
'my_mm': 'my_MM.UTF-8',
- 'nan_tw': 'nan_TW.UTF-8',
+ 'nan_tw@latin': 'nan_TW.UTF-8@latin',
'nb': 'nb_NO.ISO8859-1',
'nb_no': 'nb_NO.ISO8859-1',
'nds_de': 'nds_DE.UTF-8',
@@ -1251,9 +1196,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.UTF-8',
+ 'nr_za': 'nr_ZA.ISO8859-1',
'nso': 'nso_ZA.ISO8859-15',
- 'nso_za': 'nso_ZA.UTF-8',
+ 'nso_za': 'nso_ZA.ISO8859-15',
'ny': 'ny_NO.ISO8859-1',
'ny_no': 'ny_NO.ISO8859-1',
'nynorsk': 'nn_NO.ISO8859-1',
@@ -1268,8 +1213,6 @@ 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',
@@ -1288,18 +1231,16 @@ 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.ISO8859-5',
+ 'ru_ru': 'ru_RU.UTF-8',
'ru_ua': 'ru_UA.KOI8-U',
'rumanian': 'ro_RO.ISO8859-2',
- 'russian': 'ru_RU.KOI8-R',
+ 'russian': 'ru_RU.ISO8859-5',
'rw': 'rw_RW.ISO8859-1',
- 'rw_rw': 'rw_RW.UTF-8',
+ 'rw_rw': 'rw_RW.ISO8859-1',
'sa_in': 'sa_IN.UTF-8',
'sat_in': 'sat_IN.UTF-8',
'sc_it': 'sc_IT.UTF-8',
@@ -1309,7 +1250,6 @@ 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',
@@ -1338,7 +1278,7 @@ locale_alias = {
'spanish': 'es_ES.ISO8859-1',
'spanish_spain': 'es_ES.ISO8859-1',
'sq': 'sq_AL.ISO8859-2',
- 'sq_al': 'sq_AL.ISO8859-1',
+ 'sq_al': 'sq_AL.ISO8859-2',
'sq_mk': 'sq_MK.UTF-8',
'sr': 'sr_RS.UTF-8',
'sr@cyrillic': 'sr_RS.UTF-8',
@@ -1360,7 +1300,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.UTF-8',
+ 'ss_za': 'ss_ZA.ISO8859-1',
'st': 'st_ZA.ISO8859-1',
'st_za': 'st_ZA.ISO8859-1',
'sv': 'sv_SE.ISO8859-1',
@@ -1371,21 +1311,19 @@ locale_alias = {
'swedish': 'sv_SE.ISO8859-1',
'szl_pl': 'szl_PL.UTF-8',
'ta': 'ta_IN.TSCII-0',
- 'ta_in': 'ta_IN.UTF-8',
+ 'ta_in': 'ta_IN.TSCII-0',
'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-T',
+ 'tg_tj': 'tg_TJ.KOI8-C',
'th': 'th_TH.ISO8859-11',
- 'th_th': 'th_TH.TIS_620',
+ 'th_th': 'th_TH.ISO8859-11',
'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',
@@ -1393,34 +1331,34 @@ locale_alias = {
'tl': 'tl_PH.ISO8859-1',
'tl_ph': 'tl_PH.ISO8859-1',
'tn': 'tn_ZA.ISO8859-15',
- 'tn_za': 'tn_ZA.UTF-8',
+ 'tn_za': 'tn_ZA.ISO8859-15',
'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.UTF-8',
+ 'ts_za': 'ts_ZA.ISO8859-1',
'tt': 'tt_RU.TATAR-CYR',
- 'tt_ru': 'tt_RU.UTF-8',
+ 'tt_ru': 'tt_RU.TATAR-CYR',
'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-8',
- 'universal': 'en_US.UTF-8',
+ 'univ': 'en_US.utf',
+ 'universal': 'en_US.utf',
'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.UTF-8',
+ 'ur_pk': 'ur_PK.CP1256',
'uz': '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',
+ 'uz_uz': 'uz_UZ.UTF-8',
+ 'uz_uz@cyrillic': 'uz_UZ.UTF-8',
've': 've_ZA.UTF-8',
've_za': 've_ZA.UTF-8',
'vi': 'vi_VN.TCVN',
- 'vi_vn': 'vi_VN.UTF-8',
+ 'vi_vn': 'vi_VN.TCVN',
'vi_vn.tcvn': 'vi_VN.TCVN',
'vi_vn.tcvn5712': 'vi_VN.TCVN',
'vi_vn.viscii': 'vi_VN.VISCII',
@@ -1437,18 +1375,16 @@ 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.EUC_TW',
+ 'zh_tw.euctw': 'zh_TW.eucTW',
'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 2144819..99fab58 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.EUC_TW')
+ self.check('zh_tw.euctw', 'zh_TW.eucTW')
def test_japanese(self):
self.check('ja', 'ja_JP.eucJP')
@@ -475,9 +475,6 @@ 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):
diff --git a/Misc/NEWS b/Misc/NEWS
index 6de8794..d8ea4c9 100644
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -30,8 +30,6 @@ 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 7405e82..c7ecace 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(args.locale_alias))
data.update(parse_glibc_supported(args.glibc_supported))
+ data.update(parse(args.locale_alias))
while True:
# Repeat optimization while the size is decreased.
n = len(data)