blob: b9bfd979fab2eba1c19bcfdc887ce138055a72df [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
Guido van Rossum9e896b32000-04-05 20:11:21 +000062 # MBCS
63 'dbcs': 'mbcs',
64
Marc-André Lemburg4fd73f02000-06-07 09:12:30 +000065 # 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
Guido van Rossum0229bf62000-03-10 23:17:24 +000082}