]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #22682: Added support for the kz1048 encoding.
authorSerhiy Storchaka <storchaka@gmail.com>
Tue, 12 May 2015 20:16:55 +0000 (23:16 +0300)
committerSerhiy Storchaka <storchaka@gmail.com>
Tue, 12 May 2015 20:16:55 +0000 (23:16 +0300)
Doc/library/codecs.rst
Doc/whatsnew/3.5.rst
Lib/encodings/aliases.py
Lib/locale.py
Lib/test/test_codecs.py
Lib/test/test_unicode.py
Lib/test/test_xml_etree.py
Misc/NEWS

index 0430cb92a442406add85895c43f3f8b4aa5483cd..b3bd6af5302be2cf8eaa7b172898e80dd696d91f 100644 (file)
@@ -1162,6 +1162,10 @@ particular, the following variants typically exist:
 +-----------------+--------------------------------+--------------------------------+
 | koi8_u          |                                | Ukrainian                      |
 +-----------------+--------------------------------+--------------------------------+
+| kz1048          | kz_1048, strk1048_2002, rk1048 | Kazakh                         |
+|                 |                                |                                |
+|                 |                                | .. versionadded:: 3.5          |
++-----------------+--------------------------------+--------------------------------+
 | mac_cyrillic    | maccyrillic                    | Bulgarian, Byelorussian,       |
 |                 |                                | Macedonian, Russian, Serbian   |
 +-----------------+--------------------------------+--------------------------------+
index 90418119ab1a670ad570662421269a2ae6af18ac..412d9b08a8e96f3dada60932dda5d9fd3521cbc2 100644 (file)
@@ -231,6 +231,9 @@ Some smaller changes made to the core Python language are:
 * The :option:`-b` option now affects comparisons of :class:`bytes` with
   :class:`int`.  (Contributed by Serhiy Storchaka in :issue:`23681`)
 
+* New Kazakh :ref:`codec <standard-encodings>` ``kz1048``.  (Contributed by
+  Serhiy Storchaka in :issue:`22682`.)
+
 
 New Modules
 ===========
index 4cbaadea3ee60267483e70699c3ad931a46a298a..67c828d639e03190347409cb13e60acd89b28245 100644 (file)
@@ -412,6 +412,11 @@ aliases = {
     # koi8_r codec
     'cskoi8r'            : 'koi8_r',
 
+    # kz1048 codec
+    'kz_1048'           : 'kz1048',
+    'rk1048'            : 'kz1048',
+    'strk1048_2002'     : 'kz1048',
+
     # latin_1 codec
     #
     # Note that the latin_1 codec is implemented internally in C and a
index 6b9eb3a09bc73f89dc5660976c495c87c3b2cdcd..c24f73167ebf0cb6a66907b50587f412186dd5a9 100644 (file)
@@ -700,6 +700,7 @@ locale_encoding_alias = {
     'utf_8':                        'UTF-8',
     'koi8_r':                       'KOI8-R',
     'koi8_u':                       'KOI8-U',
+    'kz1048':                       'RK1048',
     'cp1251':                       'CP1251',
     'cp1255':                       'CP1255',
     'cp1256':                       'CP1256',
index fb3db77a92e2e35a01f5205a288adffa627513c3..e7e189d3a0c4f1366943a976e336b4b2e29dffa0 100644 (file)
@@ -1823,6 +1823,7 @@ all_unicode_encodings = [
     "johab",
     "koi8_r",
     "koi8_u",
+    "kz1048",
     "latin_1",
     "mac_cyrillic",
     "mac_greek",
index 2773fe5373e735314c900c0fb33f638129e0f4b6..b1d453b4785c5c44905d3b06edd3a4528b045bf1 100644 (file)
@@ -2081,7 +2081,7 @@ class UnicodeTest(string_tests.CommonTest,
             'cp863', 'cp865', 'cp866', 'cp1125',
             'iso8859_10', 'iso8859_13', 'iso8859_14', 'iso8859_15',
             'iso8859_2', 'iso8859_3', 'iso8859_4', 'iso8859_5', 'iso8859_6',
-            'iso8859_7', 'iso8859_9', 'koi8_r', 'latin_1',
+            'iso8859_7', 'iso8859_9', 'koi8_r', 'kz1048', 'latin_1',
             'mac_cyrillic', 'mac_latin2',
 
             'cp1250', 'cp1251', 'cp1252', 'cp1253', 'cp1254', 'cp1255',
@@ -2116,7 +2116,7 @@ class UnicodeTest(string_tests.CommonTest,
             #'cp1250', 'cp1251', 'cp1252', 'cp1253', 'cp1254', 'cp1255',
             #'cp1256', 'cp1257', 'cp1258',
             #'cp424', 'cp856', 'cp857', 'cp864', 'cp869', 'cp874',
-            #'iso8859_3', 'iso8859_6', 'iso8859_7',
+            #'iso8859_3', 'iso8859_6', 'iso8859_7', 'kz1048',
             #'mac_greek', 'mac_iceland','mac_roman', 'mac_turkish',
 
             ### These fail the round-trip:
index d3c0da081d1fe32ff92e7e7f15ee82bcfc9a6d6b..5e6388948198326109bb7d9919dcc7e71cd7ac17 100644 (file)
@@ -704,7 +704,7 @@ class ElementTreeTest(unittest.TestCase):
             'mac-roman', 'mac-turkish',
             'iso2022-jp', 'iso2022-jp-1', 'iso2022-jp-2', 'iso2022-jp-2004',
             'iso2022-jp-3', 'iso2022-jp-ext',
-            'koi8-r', 'koi8-u',
+            'koi8-r', 'koi8-u', 'kz1048',
             'hz', 'ptcp154',
         ]
         for encoding in supported_encodings:
index 2aa61d0db6c843c31508e8de50d52418daa8c173..a46e80a926f3a74c746dbbd4a0ca01d06decda1c 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -42,6 +42,8 @@ Core and Builtins
 Library
 -------
 
+- Issue #22682: Added support for the kz1048 encoding.
+
 - Issue #23796: peak and read1 methods of BufferedReader now raise ValueError
   if they called on a closed object. Patch by John Hergenroeder.