Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Doc/library/codecs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1155,7 +1155,7 @@ particular, the following variants typically exist:
+-----------------+--------------------------------+--------------------------------+
| cp857 | 857, IBM857 | Turkish |
+-----------------+--------------------------------+--------------------------------+
| cp858 | 858, IBM858 | Western Europe |
| cp858 | 858, IBM00858 | Western Europe |
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have not added all existing aliases (see #42237), just changed the documented ones to officially registered names.

+-----------------+--------------------------------+--------------------------------+
| cp860 | 860, IBM860 | Portuguese |
+-----------------+--------------------------------+--------------------------------+
Expand Down Expand Up @@ -1192,7 +1192,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 |
+-----------------+--------------------------------+--------------------------------+
Expand Down
8 changes: 8 additions & 0 deletions Lib/encodings/aliases.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,10 @@

# cp1140 codec
'1140' : 'cp1140',
'cp01140' : 'cp1140',
'csibm01140' : 'cp1140',
'ebcdic_us_37_euro' : 'cp1140',
'ibm01140' : 'cp1140',
'ibm1140' : 'cp1140',

# cp1250 codec
Expand Down Expand Up @@ -159,8 +163,12 @@

# cp858 codec
'858' : 'cp858',
'cp00858' : 'cp858',
'csibm00858' : 'cp858',
'csibm858' : 'cp858',
'ibm00858' : 'cp858',
'ibm858' : 'cp858',
'pc_multilingual_850_euro' : 'cp858',

# cp860 codec
'860' : 'cp860',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Add IANA registered names and aliases with leading zeros before number (like
IBM00858, CP00858, IBM01140, CP01140) for corresponding codecs.
Loading