Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f0eeedf

Browse files
Issue #22681: Added support for the koi8_t encoding.
1 parent ad8a1c3 commit f0eeedf

7 files changed

Lines changed: 16 additions & 4 deletions

File tree

Doc/library/codecs.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1160,6 +1160,10 @@ particular, the following variants typically exist:
11601160
+-----------------+--------------------------------+--------------------------------+
11611161
| koi8_r | | Russian |
11621162
+-----------------+--------------------------------+--------------------------------+
1163+
| koi8_t | | Tajik |
1164+
| | | |
1165+
| | | .. versionadded:: 3.5 |
1166+
+-----------------+--------------------------------+--------------------------------+
11631167
| koi8_u | | Ukrainian |
11641168
+-----------------+--------------------------------+--------------------------------+
11651169
| kz1048 | kz_1048, strk1048_2002, rk1048 | Kazakh |

Doc/whatsnew/3.5.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,9 @@ Some smaller changes made to the core Python language are:
234234
* New Kazakh :ref:`codec <standard-encodings>` ``kz1048``. (Contributed by
235235
Serhiy Storchaka in :issue:`22682`.)
236236

237+
* New Tajik :ref:`codec <standard-encodings>` ``koi8_t``. (Contributed by
238+
Serhiy Storchaka in :issue:`22681`.)
239+
237240

238241
New Modules
239242
===========

Lib/locale.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -699,6 +699,7 @@ def getpreferredencoding(do_setlocale = True):
699699
'euc_kr': 'eucKR',
700700
'utf_8': 'UTF-8',
701701
'koi8_r': 'KOI8-R',
702+
'koi8_t': 'KOI8-T',
702703
'koi8_u': 'KOI8-U',
703704
'kz1048': 'RK1048',
704705
'cp1251': 'CP1251',

Lib/test/test_codecs.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1822,6 +1822,7 @@ def test_basic(self):
18221822
"iso8859_9",
18231823
"johab",
18241824
"koi8_r",
1825+
"koi8_t",
18251826
"koi8_u",
18261827
"kz1048",
18271828
"latin_1",

Lib/test/test_unicode.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2081,7 +2081,8 @@ def test_codecs_charmap(self):
20812081
'cp863', 'cp865', 'cp866', 'cp1125',
20822082
'iso8859_10', 'iso8859_13', 'iso8859_14', 'iso8859_15',
20832083
'iso8859_2', 'iso8859_3', 'iso8859_4', 'iso8859_5', 'iso8859_6',
2084-
'iso8859_7', 'iso8859_9', 'koi8_r', 'kz1048', 'latin_1',
2084+
'iso8859_7', 'iso8859_9',
2085+
'koi8_r', 'koi8_t', 'koi8_u', 'kz1048', 'latin_1',
20852086
'mac_cyrillic', 'mac_latin2',
20862087

20872088
'cp1250', 'cp1251', 'cp1252', 'cp1253', 'cp1254', 'cp1255',
@@ -2109,14 +2110,14 @@ def test_codecs_charmap(self):
21092110
'cp863', 'cp865', 'cp866', 'cp1125',
21102111
'iso8859_10', 'iso8859_13', 'iso8859_14', 'iso8859_15',
21112112
'iso8859_2', 'iso8859_4', 'iso8859_5',
2112-
'iso8859_9', 'koi8_r', 'latin_1',
2113+
'iso8859_9', 'koi8_r', 'koi8_u', 'latin_1',
21132114
'mac_cyrillic', 'mac_latin2',
21142115

21152116
### These have undefined mappings:
21162117
#'cp1250', 'cp1251', 'cp1252', 'cp1253', 'cp1254', 'cp1255',
21172118
#'cp1256', 'cp1257', 'cp1258',
21182119
#'cp424', 'cp856', 'cp857', 'cp864', 'cp869', 'cp874',
2119-
#'iso8859_3', 'iso8859_6', 'iso8859_7', 'kz1048',
2120+
#'iso8859_3', 'iso8859_6', 'iso8859_7', 'koi8_t', 'kz1048',
21202121
#'mac_greek', 'mac_iceland','mac_roman', 'mac_turkish',
21212122

21222123
### These fail the round-trip:

Lib/test/test_xml_etree.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -704,7 +704,7 @@ def bxml(encoding):
704704
'mac-roman', 'mac-turkish',
705705
'iso2022-jp', 'iso2022-jp-1', 'iso2022-jp-2', 'iso2022-jp-2004',
706706
'iso2022-jp-3', 'iso2022-jp-ext',
707-
'koi8-r', 'koi8-u', 'kz1048',
707+
'koi8-r', 'koi8-t', 'koi8-u', 'kz1048',
708708
'hz', 'ptcp154',
709709
]
710710
for encoding in supported_encodings:

Misc/NEWS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,8 @@ Core and Builtins
4242
Library
4343
-------
4444

45+
- Issue #22681: Added support for the koi8_t encoding.
46+
4547
- Issue #22682: Added support for the kz1048 encoding.
4648

4749
- Issue #23796: peak and read1 methods of BufferedReader now raise ValueError

0 commit comments

Comments
 (0)