summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-05-12 20:16:55 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2015-05-12 20:16:55 (GMT)
commitad8a1c3fb27aa3e240540888b6062597dce36fe8 (patch)
tree6e135c90bd2f7dbe9dd39e6c382d1c43af53dcee /Lib
parent0d4df752acbaf14164f1e8b2b95ebe3fe288bb82 (diff)
downloadcpython-ad8a1c3fb27aa3e240540888b6062597dce36fe8.zip
cpython-ad8a1c3fb27aa3e240540888b6062597dce36fe8.tar.gz
cpython-ad8a1c3fb27aa3e240540888b6062597dce36fe8.tar.bz2
Issue #22682: Added support for the kz1048 encoding.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/encodings/aliases.py5
-rw-r--r--Lib/locale.py1
-rw-r--r--Lib/test/test_codecs.py1
-rw-r--r--Lib/test/test_unicode.py4
-rw-r--r--Lib/test/test_xml_etree.py2
5 files changed, 10 insertions, 3 deletions
diff --git a/Lib/encodings/aliases.py b/Lib/encodings/aliases.py
index 4cbaade..67c828d 100644
--- a/Lib/encodings/aliases.py
+++ b/Lib/encodings/aliases.py
@@ -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
diff --git a/Lib/locale.py b/Lib/locale.py
index 6b9eb3a..c24f731 100644
--- a/Lib/locale.py
+++ b/Lib/locale.py
@@ -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',
diff --git a/Lib/test/test_codecs.py b/Lib/test/test_codecs.py
index fb3db77..e7e189d 100644
--- a/Lib/test/test_codecs.py
+++ b/Lib/test/test_codecs.py
@@ -1823,6 +1823,7 @@ all_unicode_encodings = [
"johab",
"koi8_r",
"koi8_u",
+ "kz1048",
"latin_1",
"mac_cyrillic",
"mac_greek",
diff --git a/Lib/test/test_unicode.py b/Lib/test/test_unicode.py
index 2773fe5..b1d453b 100644
--- a/Lib/test/test_unicode.py
+++ b/Lib/test/test_unicode.py
@@ -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:
diff --git a/Lib/test/test_xml_etree.py b/Lib/test/test_xml_etree.py
index d3c0da0..5e63889 100644
--- a/Lib/test/test_xml_etree.py
+++ b/Lib/test/test_xml_etree.py
@@ -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: