blob: cb9251cc35f35803f12077dd9c2734d2573d03ec [file] [log] [blame]
Guido van Rossum0229bf62000-03-10 23:17:24 +00001""" Encoding Aliases Support
2
3 This module is used by the encodings package search function to
4 map encodings names to module names.
5
6 Note that the search function converts the encoding names to lower
7 case and replaces hyphens with underscores *before* performing the
8 lookup.
9
10"""
11aliases = {
12
13 # Latin-1
14 'latin': 'latin_1',
15 'latin1': 'latin_1',
16
17 # UTF-8
18 'utf': 'utf_8',
19 'utf8': 'utf_8',
20 'u8': 'utf_8',
Marc-André Lemburg4fd73f02000-06-07 09:12:30 +000021 'utf8@ucs2': 'utf_8',
22 'utf8@ucs4': 'utf_8',
Guido van Rossum0229bf62000-03-10 23:17:24 +000023
24 # UTF-16
25 'utf16': 'utf_16',
26 'u16': 'utf_16',
27 'utf_16be': 'utf_16_be',
28 'utf_16le': 'utf_16_le',
Guido van Rossum68895ed2000-03-31 17:23:18 +000029 'unicodebigunmarked': 'utf_16_be',
30 'unicodelittleunmarked': 'utf_16_le',
Guido van Rossum0229bf62000-03-10 23:17:24 +000031
32 # ASCII
33 'us_ascii': 'ascii',
34
35 # ISO
Marc-André Lemburg4fd73f02000-06-07 09:12:30 +000036 '8859': 'latin_1',
37 'iso8859': 'latin_1',
Guido van Rossum0229bf62000-03-10 23:17:24 +000038 'iso8859_1': 'latin_1',
39 'iso_8859_1': 'latin_1',
40 'iso_8859_10': 'iso8859_10',
41 'iso_8859_13': 'iso8859_13',
42 'iso_8859_14': 'iso8859_14',
43 'iso_8859_15': 'iso8859_15',
44 'iso_8859_2': 'iso8859_2',
45 'iso_8859_3': 'iso8859_3',
46 'iso_8859_4': 'iso8859_4',
47 'iso_8859_5': 'iso8859_5',
48 'iso_8859_6': 'iso8859_6',
49 'iso_8859_7': 'iso8859_7',
50 'iso_8859_8': 'iso8859_8',
51 'iso_8859_9': 'iso8859_9',
52
53 # Mac
Marc-André Lemburg4fd73f02000-06-07 09:12:30 +000054 'maclatin2': 'mac_latin2',
Guido van Rossum68895ed2000-03-31 17:23:18 +000055 'maccentraleurope': 'mac_latin2',
56 'maccyrillic': 'mac_cyrillic',
57 'macgreek': 'mac_greek',
58 'maciceland': 'mac_iceland',
59 'macroman': 'mac_roman',
60 'macturkish': 'mac_turkish',
Guido van Rossum0229bf62000-03-10 23:17:24 +000061
Mark Hammond194bfb22001-06-04 02:31:23 +000062 # Windows
63 'windows_1252': 'cp1252',
64 'windows_1254': 'cp1254',
65 'windows_1255': 'cp1255',
66
Guido van Rossum9e896b32000-04-05 20:11:21 +000067 # MBCS
68 'dbcs': 'mbcs',
69
Marc-André Lemburg4fd73f02000-06-07 09:12:30 +000070 # Code pages
71 '437': 'cp437',
72
73 # CJK
74 #
75 # The codecs for these encodings are not distributed with the
76 # Python core, but are included here for reference, since the
77 # locale module relies on having these aliases available.
78 #
79 'jis_7': 'jis_7',
80 'iso_2022_jp': 'jis_7',
81 'ujis': 'euc_jp',
82 'ajec': 'euc_jp',
83 'eucjp': 'euc_jp',
84 'tis260': 'tactis',
85 'sjis': 'shift_jis',
86
Marc-André Lemburg2d920412001-05-15 12:00:02 +000087 # Content transfer/compression encodings
88 'rot13': 'rot_13',
89 'base64': 'base64_codec',
90 'base_64': 'base64_codec',
91 'zlib': 'zlib_codec',
92 'zip': 'zlib_codec',
93 'hex': 'hex_codec',
94 'uu': 'uu_codec',
Guido van Rossumacfdf152001-05-15 15:34:07 +000095 'quopri': 'quopri_codec',
96 'quotedprintable': 'quopri_codec',
97 'quoted_printable': 'quopri_codec',
Marc-André Lemburg2d920412001-05-15 12:00:02 +000098
Guido van Rossum0229bf62000-03-10 23:17:24 +000099}