py-cvs-rel2_1 (Rev 1.2) merge
[python/dscho.git] / Lib / encodings / aliases.py
blobfd9b3bdf181cc00daf16b0ae6fb07fdab4b505b5
1 """ Encoding Aliases Support
3 This module is used by the encodings package search function to
4 map encodings names to module names.
6 Note that the search function converts the encoding names to lower
7 case and replaces hyphens with underscores *before* performing the
8 lookup.
10 """
11 aliases = {
13 # Latin-1
14 'latin': 'latin_1',
15 'latin1': 'latin_1',
17 # UTF-8
18 'utf': 'utf_8',
19 'utf8': 'utf_8',
20 'u8': 'utf_8',
21 'utf8@ucs2': 'utf_8',
22 'utf8@ucs4': 'utf_8',
24 # UTF-16
25 'utf16': 'utf_16',
26 'u16': 'utf_16',
27 'utf_16be': 'utf_16_be',
28 'utf_16le': 'utf_16_le',
29 'unicodebigunmarked': 'utf_16_be',
30 'unicodelittleunmarked': 'utf_16_le',
32 # ASCII
33 'us_ascii': 'ascii',
35 # EBCDIC
36 'ebcdic_cp_us': 'cp037',
37 'ibm039': 'cp037',
38 'ibm1140': 'cp1140',
40 # ISO
41 '8859': 'latin_1',
42 'iso8859': 'latin_1',
43 'iso8859_1': 'latin_1',
44 'iso_8859_1': 'latin_1',
45 'iso_8859_10': 'iso8859_10',
46 'iso_8859_13': 'iso8859_13',
47 'iso_8859_14': 'iso8859_14',
48 'iso_8859_15': 'iso8859_15',
49 'iso_8859_2': 'iso8859_2',
50 'iso_8859_3': 'iso8859_3',
51 'iso_8859_4': 'iso8859_4',
52 'iso_8859_5': 'iso8859_5',
53 'iso_8859_6': 'iso8859_6',
54 'iso_8859_7': 'iso8859_7',
55 'iso_8859_8': 'iso8859_8',
56 'iso_8859_9': 'iso8859_9',
58 # Mac
59 'maclatin2': 'mac_latin2',
60 'maccentraleurope': 'mac_latin2',
61 'maccyrillic': 'mac_cyrillic',
62 'macgreek': 'mac_greek',
63 'maciceland': 'mac_iceland',
64 'macroman': 'mac_roman',
65 'macturkish': 'mac_turkish',
67 # Windows
68 'windows_1252': 'cp1252',
69 'windows_1254': 'cp1254',
70 'windows_1255': 'cp1255',
72 # MBCS
73 'dbcs': 'mbcs',
75 # Code pages
76 '437': 'cp437',
78 # CJK
80 # The codecs for these encodings are not distributed with the
81 # Python core, but are included here for reference, since the
82 # locale module relies on having these aliases available.
84 'jis_7': 'jis_7',
85 'iso_2022_jp': 'jis_7',
86 'ujis': 'euc_jp',
87 'ajec': 'euc_jp',
88 'eucjp': 'euc_jp',
89 'tis260': 'tactis',
90 'sjis': 'shift_jis',
92 # Content transfer/compression encodings
93 'rot13': 'rot_13',
94 'base64': 'base64_codec',
95 'base_64': 'base64_codec',
96 'zlib': 'zlib_codec',
97 'zip': 'zlib_codec',
98 'hex': 'hex_codec',
99 'uu': 'uu_codec',
100 'quopri': 'quopri_codec',
101 'quotedprintable': 'quopri_codec',
102 'quoted_printable': 'quopri_codec',