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

Skip to content

Commit 4fd73f0

Browse files
committed
Marc-Andre Lemburg <[email protected]>:
Added some more codec aliases. Some of them are needed by the new locale.py encoding support.
1 parent 990bbe9 commit 4fd73f0

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

Lib/encodings/aliases.py

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818
'utf': 'utf_8',
1919
'utf8': 'utf_8',
2020
'u8': 'utf_8',
21+
'utf8@ucs2': 'utf_8',
22+
'utf8@ucs4': 'utf_8',
2123

2224
# UTF-16
2325
'utf16': 'utf_16',
@@ -31,6 +33,8 @@
3133
'us_ascii': 'ascii',
3234

3335
# ISO
36+
'8859': 'latin_1',
37+
'iso8859': 'latin_1',
3438
'iso8859_1': 'latin_1',
3539
'iso_8859_1': 'latin_1',
3640
'iso_8859_10': 'iso8859_10',
@@ -47,6 +51,7 @@
4751
'iso_8859_9': 'iso8859_9',
4852

4953
# Mac
54+
'maclatin2': 'mac_latin2',
5055
'maccentraleurope': 'mac_latin2',
5156
'maccyrillic': 'mac_cyrillic',
5257
'macgreek': 'mac_greek',
@@ -57,4 +62,21 @@
5762
# MBCS
5863
'dbcs': 'mbcs',
5964

65+
# Code pages
66+
'437': 'cp437',
67+
68+
# CJK
69+
#
70+
# The codecs for these encodings are not distributed with the
71+
# Python core, but are included here for reference, since the
72+
# locale module relies on having these aliases available.
73+
#
74+
'jis_7': 'jis_7',
75+
'iso_2022_jp': 'jis_7',
76+
'ujis': 'euc_jp',
77+
'ajec': 'euc_jp',
78+
'eucjp': 'euc_jp',
79+
'tis260': 'tactis',
80+
'sjis': 'shift_jis',
81+
6082
}

0 commit comments

Comments
 (0)