]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.13] gh-149801: Add IANA registered names and aliases with leading zeros (GH-149804... 3.13
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 15 May 2026 12:08:50 +0000 (14:08 +0200)
committerGitHub <noreply@github.com>
Fri, 15 May 2026 12:08:50 +0000 (15:08 +0300)
Like IBM00858, CP00858, IBM01140, CP01140.
(cherry picked from commit 20438866aefc2e63949d8bb85d8f8e55633fd977)

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Doc/library/codecs.rst
Lib/encodings/aliases.py
Misc/NEWS.d/next/Library/2026-05-13-23-18-39.gh-issue-149801.S_FfGr.rst [new file with mode: 0644]

index bbc67ead2baeb9f358564acc189831c57394b997..8f3a4768c5efc2f4379ef53fe0fd5799e0ae67a6 100644 (file)
@@ -1144,7 +1144,7 @@ particular, the following variants typically exist:
 +-----------------+--------------------------------+--------------------------------+
 | cp857           | 857, IBM857                    | Turkish                        |
 +-----------------+--------------------------------+--------------------------------+
-| cp858           | 858, IBM858                    | Western Europe                 |
+| cp858           | 858, IBM00858                  | Western Europe                 |
 +-----------------+--------------------------------+--------------------------------+
 | cp860           | 860, IBM860                    | Portuguese                     |
 +-----------------+--------------------------------+--------------------------------+
@@ -1181,7 +1181,7 @@ particular, the following variants typically exist:
 |                 |                                |                                |
 |                 |                                | .. versionadded:: 3.4          |
 +-----------------+--------------------------------+--------------------------------+
-| cp1140          | ibm1140                        | Western Europe                 |
+| cp1140          | IBM01140                       | Western Europe                 |
 +-----------------+--------------------------------+--------------------------------+
 | cp1250          | windows-1250                   | Central and Eastern Europe     |
 +-----------------+--------------------------------+--------------------------------+
index 6a5ca046b5eb6cd46e5caa6fc7d84513beb8d85a..03645b8f5fa7afd7185baa00f2e3be42208e982a 100644 (file)
@@ -71,6 +71,10 @@ aliases = {
 
     # cp1140 codec
     '1140'               : 'cp1140',
+    'cp01140'            : 'cp1140',
+    'csibm01140'         : 'cp1140',
+    'ebcdic_us_37_euro'  : 'cp1140',
+    'ibm01140'           : 'cp1140',
     'ibm1140'            : 'cp1140',
 
     # cp1250 codec
@@ -159,8 +163,12 @@ aliases = {
 
     # cp858 codec
     '858'                : 'cp858',
+    'cp00858'            : 'cp858',
+    'csibm00858'         : 'cp858',
     'csibm858'           : 'cp858',
+    'ibm00858'           : 'cp858',
     'ibm858'             : 'cp858',
+    'pc_multilingual_850_euro' : 'cp858',
 
     # cp860 codec
     '860'                : 'cp860',
diff --git a/Misc/NEWS.d/next/Library/2026-05-13-23-18-39.gh-issue-149801.S_FfGr.rst b/Misc/NEWS.d/next/Library/2026-05-13-23-18-39.gh-issue-149801.S_FfGr.rst
new file mode 100644 (file)
index 0000000..f9e8538
--- /dev/null
@@ -0,0 +1,2 @@
+Add IANA registered names and aliases with leading zeros before number (like
+IBM00858, CP00858, IBM01140, CP01140) for corresponding codecs.