[Python-checkins] cpython (merge 3.4 -> default): Issue #20076: Added non derived UTF-8 aliases to locale aliases table.

serhiy.storchaka python-checkins at python.org
Wed Oct 1 23:15:00 CEST 2014


https://hg.python.org/cpython/rev/301b9a58021c
changeset:   92728:301b9a58021c
parent:      92725:6e56f7412bfa
parent:      92727:3bff73df6dab
user:        Serhiy Storchaka <storchaka at gmail.com>
date:        Thu Oct 02 00:11:21 2014 +0300
summary:
  Issue #20076: Added non derived UTF-8 aliases to locale aliases table.

The makelocalealias.py script no longer ignores UTF-8 mapping.

files:
  Lib/locale.py                 |  9 +++++++++
  Misc/NEWS                     |  4 ++++
  Tools/i18n/makelocalealias.py |  4 ----
  3 files changed, 13 insertions(+), 4 deletions(-)


diff --git a/Lib/locale.py b/Lib/locale.py
--- a/Lib/locale.py
+++ b/Lib/locale.py
@@ -861,6 +861,7 @@
     'az_az.iso88599e':                      'az_AZ.ISO8859-9E',
     'be':                                   'be_BY.CP1251',
     'be at latin':                             'be_BY.UTF-8 at latin',
+    'be_bg.utf8':                           'bg_BG.UTF-8',
     'be_by':                                'be_BY.CP1251',
     'be_by at latin':                          'be_BY.UTF-8 at latin',
     'bem_zm':                               'bem_ZM.UTF-8',
@@ -887,6 +888,7 @@
     'c.ascii':                              'C',
     'c.en':                                 'C',
     'c.iso88591':                           'en_US.ISO8859-1',
+    'c.utf8':                               'en_US.UTF-8',
     'c_c':                                  'C',
     'c_c.c':                                'C',
     'ca':                                   'ca_ES.ISO8859-1',
@@ -940,6 +942,7 @@
     'en_bw':                                'en_BW.ISO8859-1',
     'en_ca':                                'en_CA.ISO8859-1',
     'en_dk':                                'en_DK.ISO8859-1',
+    'en_dl.utf8':                           'en_DL.UTF-8',
     'en_gb':                                'en_GB.ISO8859-1',
     'en_hk':                                'en_HK.ISO8859-1',
     'en_ie':                                'en_IE.ISO8859-1',
@@ -954,6 +957,7 @@
     '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_uk':                           'en_GB.ISO8859-1',
@@ -1106,6 +1110,7 @@
     'korean.euc':                           'ko_KR.eucKR',
     'ks':                                   'ks_IN.UTF-8',
     'ks_in':                                'ks_IN.UTF-8',
+    'ks_in at devanagari.utf8':                'ks_IN.UTF-8 at devanagari',
     'ku_tr':                                'ku_TR.ISO8859-9',
     'kw':                                   'kw_GB.ISO8859-1',
     'kw_gb':                                'kw_GB.ISO8859-1',
@@ -1218,6 +1223,7 @@
     'sc_it':                                'sc_IT.UTF-8',
     'sd':                                   'sd_IN.UTF-8',
     'sd_in':                                'sd_IN.UTF-8',
+    'sd_in at devanagari.utf8':                'sd_IN.UTF-8 at devanagari',
     'se_no':                                'se_NO.UTF-8',
     'serbocroatian':                        'sr_RS.UTF-8 at latin',
     'sh':                                   'sr_RS.UTF-8 at latin',
@@ -1258,6 +1264,7 @@
     'sr_cs at latn':                           'sr_CS.UTF-8 at latin',
     'sr_me':                                'sr_ME.UTF-8',
     'sr_rs':                                'sr_RS.UTF-8',
+    'sr_rs.utf8 at latn':                      'sr_RS.UTF-8 at latin',
     'sr_rs at latn':                           'sr_RS.UTF-8 at latin',
     'sr_sp':                                'sr_CS.ISO8859-2',
     'sr_yu':                                'sr_RS.UTF-8 at latin',
@@ -1266,6 +1273,8 @@
     'sr_yu.iso88595':                       'sr_CS.ISO8859-5',
     'sr_yu.iso88595 at cyrillic':              'sr_CS.ISO8859-5',
     'sr_yu.microsoftcp1251 at cyrillic':       'sr_CS.CP1251',
+    'sr_yu.utf8':                           'sr_RS.UTF-8',
+    'sr_yu.utf8 at cyrillic':                  'sr_RS.UTF-8',
     'sr_yu at cyrillic':                       'sr_RS.UTF-8',
     'ss':                                   'ss_ZA.ISO8859-1',
     'ss_za':                                'ss_ZA.ISO8859-1',
diff --git a/Misc/NEWS b/Misc/NEWS
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -156,6 +156,8 @@
 Library
 -------
 
+- Issue #20076: Added non derived UTF-8 aliases to locale aliases table.
+
 - Issue #20079: Added locales supported in glibc 2.18 to locale alias table.
 
 - Issue #20218: Added convenience methods read_text/write_text and read_bytes/
@@ -1188,6 +1190,8 @@
 Tools/Demos
 -----------
 
+- Issue #20076: The makelocalealias.py script no longer ignores UTF-8 mapping.
+
 - Issue #20079: The makelocalealias.py script now can parse the SUPPORTED file
   from glibc sources and supports command line options for source paths.
 
diff --git a/Tools/i18n/makelocalealias.py b/Tools/i18n/makelocalealias.py
--- a/Tools/i18n/makelocalealias.py
+++ b/Tools/i18n/makelocalealias.py
@@ -45,10 +45,6 @@
             encoding = encoding.replace('-', '')
             encoding = encoding.replace('_', '')
             locale = lang + '.' + encoding
-            if encoding.lower() == 'utf8':
-                # Ignore UTF-8 mappings - this encoding should be
-                # available for all locales
-                continue
         data[locale] = alias
     return data
 

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list