ยปCore Development>Code coverage>Lib/encodings/aliases.py

Python code coverage for Lib/encodings/aliases.py

#countcontent
1n/a""" Encoding Aliases Support
2n/a
3n/a This module is used by the encodings package search function to
4n/a map encodings names to module names.
5n/a
6n/a Note that the search function normalizes the encoding names before
7n/a doing the lookup, so the mapping will have to map normalized
8n/a encoding names to module names.
9n/a
10n/a Contents:
11n/a
12n/a The following aliases dictionary contains mappings of all IANA
13n/a character set names for which the Python core library provides
14n/a codecs. In addition to these, a few Python specific codec
15n/a aliases have also been added.
16n/a
17n/a"""
18n/aaliases = {
19n/a
20n/a # Please keep this list sorted alphabetically by value !
21n/a
22n/a # ascii codec
23n/a '646' : 'ascii',
24n/a 'ansi_x3.4_1968' : 'ascii',
25n/a 'ansi_x3_4_1968' : 'ascii', # some email headers use this non-standard name
26n/a 'ansi_x3.4_1986' : 'ascii',
27n/a 'cp367' : 'ascii',
28n/a 'csascii' : 'ascii',
29n/a 'ibm367' : 'ascii',
30n/a 'iso646_us' : 'ascii',
31n/a 'iso_646.irv_1991' : 'ascii',
32n/a 'iso_ir_6' : 'ascii',
33n/a 'us' : 'ascii',
34n/a 'us_ascii' : 'ascii',
35n/a
36n/a # base64_codec codec
37n/a 'base64' : 'base64_codec',
38n/a 'base_64' : 'base64_codec',
39n/a
40n/a # big5 codec
41n/a 'big5_tw' : 'big5',
42n/a 'csbig5' : 'big5',
43n/a
44n/a # big5hkscs codec
45n/a 'big5_hkscs' : 'big5hkscs',
46n/a 'hkscs' : 'big5hkscs',
47n/a
48n/a # bz2_codec codec
49n/a 'bz2' : 'bz2_codec',
50n/a
51n/a # cp037 codec
52n/a '037' : 'cp037',
53n/a 'csibm037' : 'cp037',
54n/a 'ebcdic_cp_ca' : 'cp037',
55n/a 'ebcdic_cp_nl' : 'cp037',
56n/a 'ebcdic_cp_us' : 'cp037',
57n/a 'ebcdic_cp_wt' : 'cp037',
58n/a 'ibm037' : 'cp037',
59n/a 'ibm039' : 'cp037',
60n/a
61n/a # cp1026 codec
62n/a '1026' : 'cp1026',
63n/a 'csibm1026' : 'cp1026',
64n/a 'ibm1026' : 'cp1026',
65n/a
66n/a # cp1125 codec
67n/a '1125' : 'cp1125',
68n/a 'ibm1125' : 'cp1125',
69n/a 'cp866u' : 'cp1125',
70n/a 'ruscii' : 'cp1125',
71n/a
72n/a # cp1140 codec
73n/a '1140' : 'cp1140',
74n/a 'ibm1140' : 'cp1140',
75n/a
76n/a # cp1250 codec
77n/a '1250' : 'cp1250',
78n/a 'windows_1250' : 'cp1250',
79n/a
80n/a # cp1251 codec
81n/a '1251' : 'cp1251',
82n/a 'windows_1251' : 'cp1251',
83n/a
84n/a # cp1252 codec
85n/a '1252' : 'cp1252',
86n/a 'windows_1252' : 'cp1252',
87n/a
88n/a # cp1253 codec
89n/a '1253' : 'cp1253',
90n/a 'windows_1253' : 'cp1253',
91n/a
92n/a # cp1254 codec
93n/a '1254' : 'cp1254',
94n/a 'windows_1254' : 'cp1254',
95n/a
96n/a # cp1255 codec
97n/a '1255' : 'cp1255',
98n/a 'windows_1255' : 'cp1255',
99n/a
100n/a # cp1256 codec
101n/a '1256' : 'cp1256',
102n/a 'windows_1256' : 'cp1256',
103n/a
104n/a # cp1257 codec
105n/a '1257' : 'cp1257',
106n/a 'windows_1257' : 'cp1257',
107n/a
108n/a # cp1258 codec
109n/a '1258' : 'cp1258',
110n/a 'windows_1258' : 'cp1258',
111n/a
112n/a # cp273 codec
113n/a '273' : 'cp273',
114n/a 'ibm273' : 'cp273',
115n/a 'csibm273' : 'cp273',
116n/a
117n/a # cp424 codec
118n/a '424' : 'cp424',
119n/a 'csibm424' : 'cp424',
120n/a 'ebcdic_cp_he' : 'cp424',
121n/a 'ibm424' : 'cp424',
122n/a
123n/a # cp437 codec
124n/a '437' : 'cp437',
125n/a 'cspc8codepage437' : 'cp437',
126n/a 'ibm437' : 'cp437',
127n/a
128n/a # cp500 codec
129n/a '500' : 'cp500',
130n/a 'csibm500' : 'cp500',
131n/a 'ebcdic_cp_be' : 'cp500',
132n/a 'ebcdic_cp_ch' : 'cp500',
133n/a 'ibm500' : 'cp500',
134n/a
135n/a # cp775 codec
136n/a '775' : 'cp775',
137n/a 'cspc775baltic' : 'cp775',
138n/a 'ibm775' : 'cp775',
139n/a
140n/a # cp850 codec
141n/a '850' : 'cp850',
142n/a 'cspc850multilingual' : 'cp850',
143n/a 'ibm850' : 'cp850',
144n/a
145n/a # cp852 codec
146n/a '852' : 'cp852',
147n/a 'cspcp852' : 'cp852',
148n/a 'ibm852' : 'cp852',
149n/a
150n/a # cp855 codec
151n/a '855' : 'cp855',
152n/a 'csibm855' : 'cp855',
153n/a 'ibm855' : 'cp855',
154n/a
155n/a # cp857 codec
156n/a '857' : 'cp857',
157n/a 'csibm857' : 'cp857',
158n/a 'ibm857' : 'cp857',
159n/a
160n/a # cp858 codec
161n/a '858' : 'cp858',
162n/a 'csibm858' : 'cp858',
163n/a 'ibm858' : 'cp858',
164n/a
165n/a # cp860 codec
166n/a '860' : 'cp860',
167n/a 'csibm860' : 'cp860',
168n/a 'ibm860' : 'cp860',
169n/a
170n/a # cp861 codec
171n/a '861' : 'cp861',
172n/a 'cp_is' : 'cp861',
173n/a 'csibm861' : 'cp861',
174n/a 'ibm861' : 'cp861',
175n/a
176n/a # cp862 codec
177n/a '862' : 'cp862',
178n/a 'cspc862latinhebrew' : 'cp862',
179n/a 'ibm862' : 'cp862',
180n/a
181n/a # cp863 codec
182n/a '863' : 'cp863',
183n/a 'csibm863' : 'cp863',
184n/a 'ibm863' : 'cp863',
185n/a
186n/a # cp864 codec
187n/a '864' : 'cp864',
188n/a 'csibm864' : 'cp864',
189n/a 'ibm864' : 'cp864',
190n/a
191n/a # cp865 codec
192n/a '865' : 'cp865',
193n/a 'csibm865' : 'cp865',
194n/a 'ibm865' : 'cp865',
195n/a
196n/a # cp866 codec
197n/a '866' : 'cp866',
198n/a 'csibm866' : 'cp866',
199n/a 'ibm866' : 'cp866',
200n/a
201n/a # cp869 codec
202n/a '869' : 'cp869',
203n/a 'cp_gr' : 'cp869',
204n/a 'csibm869' : 'cp869',
205n/a 'ibm869' : 'cp869',
206n/a
207n/a # cp932 codec
208n/a '932' : 'cp932',
209n/a 'ms932' : 'cp932',
210n/a 'mskanji' : 'cp932',
211n/a 'ms_kanji' : 'cp932',
212n/a
213n/a # cp949 codec
214n/a '949' : 'cp949',
215n/a 'ms949' : 'cp949',
216n/a 'uhc' : 'cp949',
217n/a
218n/a # cp950 codec
219n/a '950' : 'cp950',
220n/a 'ms950' : 'cp950',
221n/a
222n/a # euc_jis_2004 codec
223n/a 'jisx0213' : 'euc_jis_2004',
224n/a 'eucjis2004' : 'euc_jis_2004',
225n/a 'euc_jis2004' : 'euc_jis_2004',
226n/a
227n/a # euc_jisx0213 codec
228n/a 'eucjisx0213' : 'euc_jisx0213',
229n/a
230n/a # euc_jp codec
231n/a 'eucjp' : 'euc_jp',
232n/a 'ujis' : 'euc_jp',
233n/a 'u_jis' : 'euc_jp',
234n/a
235n/a # euc_kr codec
236n/a 'euckr' : 'euc_kr',
237n/a 'korean' : 'euc_kr',
238n/a 'ksc5601' : 'euc_kr',
239n/a 'ks_c_5601' : 'euc_kr',
240n/a 'ks_c_5601_1987' : 'euc_kr',
241n/a 'ksx1001' : 'euc_kr',
242n/a 'ks_x_1001' : 'euc_kr',
243n/a
244n/a # gb18030 codec
245n/a 'gb18030_2000' : 'gb18030',
246n/a
247n/a # gb2312 codec
248n/a 'chinese' : 'gb2312',
249n/a 'csiso58gb231280' : 'gb2312',
250n/a 'euc_cn' : 'gb2312',
251n/a 'euccn' : 'gb2312',
252n/a 'eucgb2312_cn' : 'gb2312',
253n/a 'gb2312_1980' : 'gb2312',
254n/a 'gb2312_80' : 'gb2312',
255n/a 'iso_ir_58' : 'gb2312',
256n/a
257n/a # gbk codec
258n/a '936' : 'gbk',
259n/a 'cp936' : 'gbk',
260n/a 'ms936' : 'gbk',
261n/a
262n/a # hex_codec codec
263n/a 'hex' : 'hex_codec',
264n/a
265n/a # hp_roman8 codec
266n/a 'roman8' : 'hp_roman8',
267n/a 'r8' : 'hp_roman8',
268n/a 'csHPRoman8' : 'hp_roman8',
269n/a
270n/a # hz codec
271n/a 'hzgb' : 'hz',
272n/a 'hz_gb' : 'hz',
273n/a 'hz_gb_2312' : 'hz',
274n/a
275n/a # iso2022_jp codec
276n/a 'csiso2022jp' : 'iso2022_jp',
277n/a 'iso2022jp' : 'iso2022_jp',
278n/a 'iso_2022_jp' : 'iso2022_jp',
279n/a
280n/a # iso2022_jp_1 codec
281n/a 'iso2022jp_1' : 'iso2022_jp_1',
282n/a 'iso_2022_jp_1' : 'iso2022_jp_1',
283n/a
284n/a # iso2022_jp_2 codec
285n/a 'iso2022jp_2' : 'iso2022_jp_2',
286n/a 'iso_2022_jp_2' : 'iso2022_jp_2',
287n/a
288n/a # iso2022_jp_2004 codec
289n/a 'iso_2022_jp_2004' : 'iso2022_jp_2004',
290n/a 'iso2022jp_2004' : 'iso2022_jp_2004',
291n/a
292n/a # iso2022_jp_3 codec
293n/a 'iso2022jp_3' : 'iso2022_jp_3',
294n/a 'iso_2022_jp_3' : 'iso2022_jp_3',
295n/a
296n/a # iso2022_jp_ext codec
297n/a 'iso2022jp_ext' : 'iso2022_jp_ext',
298n/a 'iso_2022_jp_ext' : 'iso2022_jp_ext',
299n/a
300n/a # iso2022_kr codec
301n/a 'csiso2022kr' : 'iso2022_kr',
302n/a 'iso2022kr' : 'iso2022_kr',
303n/a 'iso_2022_kr' : 'iso2022_kr',
304n/a
305n/a # iso8859_10 codec
306n/a 'csisolatin6' : 'iso8859_10',
307n/a 'iso_8859_10' : 'iso8859_10',
308n/a 'iso_8859_10_1992' : 'iso8859_10',
309n/a 'iso_ir_157' : 'iso8859_10',
310n/a 'l6' : 'iso8859_10',
311n/a 'latin6' : 'iso8859_10',
312n/a
313n/a # iso8859_11 codec
314n/a 'thai' : 'iso8859_11',
315n/a 'iso_8859_11' : 'iso8859_11',
316n/a 'iso_8859_11_2001' : 'iso8859_11',
317n/a
318n/a # iso8859_13 codec
319n/a 'iso_8859_13' : 'iso8859_13',
320n/a 'l7' : 'iso8859_13',
321n/a 'latin7' : 'iso8859_13',
322n/a
323n/a # iso8859_14 codec
324n/a 'iso_8859_14' : 'iso8859_14',
325n/a 'iso_8859_14_1998' : 'iso8859_14',
326n/a 'iso_celtic' : 'iso8859_14',
327n/a 'iso_ir_199' : 'iso8859_14',
328n/a 'l8' : 'iso8859_14',
329n/a 'latin8' : 'iso8859_14',
330n/a
331n/a # iso8859_15 codec
332n/a 'iso_8859_15' : 'iso8859_15',
333n/a 'l9' : 'iso8859_15',
334n/a 'latin9' : 'iso8859_15',
335n/a
336n/a # iso8859_16 codec
337n/a 'iso_8859_16' : 'iso8859_16',
338n/a 'iso_8859_16_2001' : 'iso8859_16',
339n/a 'iso_ir_226' : 'iso8859_16',
340n/a 'l10' : 'iso8859_16',
341n/a 'latin10' : 'iso8859_16',
342n/a
343n/a # iso8859_2 codec
344n/a 'csisolatin2' : 'iso8859_2',
345n/a 'iso_8859_2' : 'iso8859_2',
346n/a 'iso_8859_2_1987' : 'iso8859_2',
347n/a 'iso_ir_101' : 'iso8859_2',
348n/a 'l2' : 'iso8859_2',
349n/a 'latin2' : 'iso8859_2',
350n/a
351n/a # iso8859_3 codec
352n/a 'csisolatin3' : 'iso8859_3',
353n/a 'iso_8859_3' : 'iso8859_3',
354n/a 'iso_8859_3_1988' : 'iso8859_3',
355n/a 'iso_ir_109' : 'iso8859_3',
356n/a 'l3' : 'iso8859_3',
357n/a 'latin3' : 'iso8859_3',
358n/a
359n/a # iso8859_4 codec
360n/a 'csisolatin4' : 'iso8859_4',
361n/a 'iso_8859_4' : 'iso8859_4',
362n/a 'iso_8859_4_1988' : 'iso8859_4',
363n/a 'iso_ir_110' : 'iso8859_4',
364n/a 'l4' : 'iso8859_4',
365n/a 'latin4' : 'iso8859_4',
366n/a
367n/a # iso8859_5 codec
368n/a 'csisolatincyrillic' : 'iso8859_5',
369n/a 'cyrillic' : 'iso8859_5',
370n/a 'iso_8859_5' : 'iso8859_5',
371n/a 'iso_8859_5_1988' : 'iso8859_5',
372n/a 'iso_ir_144' : 'iso8859_5',
373n/a
374n/a # iso8859_6 codec
375n/a 'arabic' : 'iso8859_6',
376n/a 'asmo_708' : 'iso8859_6',
377n/a 'csisolatinarabic' : 'iso8859_6',
378n/a 'ecma_114' : 'iso8859_6',
379n/a 'iso_8859_6' : 'iso8859_6',
380n/a 'iso_8859_6_1987' : 'iso8859_6',
381n/a 'iso_ir_127' : 'iso8859_6',
382n/a
383n/a # iso8859_7 codec
384n/a 'csisolatingreek' : 'iso8859_7',
385n/a 'ecma_118' : 'iso8859_7',
386n/a 'elot_928' : 'iso8859_7',
387n/a 'greek' : 'iso8859_7',
388n/a 'greek8' : 'iso8859_7',
389n/a 'iso_8859_7' : 'iso8859_7',
390n/a 'iso_8859_7_1987' : 'iso8859_7',
391n/a 'iso_ir_126' : 'iso8859_7',
392n/a
393n/a # iso8859_8 codec
394n/a 'csisolatinhebrew' : 'iso8859_8',
395n/a 'hebrew' : 'iso8859_8',
396n/a 'iso_8859_8' : 'iso8859_8',
397n/a 'iso_8859_8_1988' : 'iso8859_8',
398n/a 'iso_ir_138' : 'iso8859_8',
399n/a
400n/a # iso8859_9 codec
401n/a 'csisolatin5' : 'iso8859_9',
402n/a 'iso_8859_9' : 'iso8859_9',
403n/a 'iso_8859_9_1989' : 'iso8859_9',
404n/a 'iso_ir_148' : 'iso8859_9',
405n/a 'l5' : 'iso8859_9',
406n/a 'latin5' : 'iso8859_9',
407n/a
408n/a # johab codec
409n/a 'cp1361' : 'johab',
410n/a 'ms1361' : 'johab',
411n/a
412n/a # koi8_r codec
413n/a 'cskoi8r' : 'koi8_r',
414n/a
415n/a # kz1048 codec
416n/a 'kz_1048' : 'kz1048',
417n/a 'rk1048' : 'kz1048',
418n/a 'strk1048_2002' : 'kz1048',
419n/a
420n/a # latin_1 codec
421n/a #
422n/a # Note that the latin_1 codec is implemented internally in C and a
423n/a # lot faster than the charmap codec iso8859_1 which uses the same
424n/a # encoding. This is why we discourage the use of the iso8859_1
425n/a # codec and alias it to latin_1 instead.
426n/a #
427n/a '8859' : 'latin_1',
428n/a 'cp819' : 'latin_1',
429n/a 'csisolatin1' : 'latin_1',
430n/a 'ibm819' : 'latin_1',
431n/a 'iso8859' : 'latin_1',
432n/a 'iso8859_1' : 'latin_1',
433n/a 'iso_8859_1' : 'latin_1',
434n/a 'iso_8859_1_1987' : 'latin_1',
435n/a 'iso_ir_100' : 'latin_1',
436n/a 'l1' : 'latin_1',
437n/a 'latin' : 'latin_1',
438n/a 'latin1' : 'latin_1',
439n/a
440n/a # mac_cyrillic codec
441n/a 'maccyrillic' : 'mac_cyrillic',
442n/a
443n/a # mac_greek codec
444n/a 'macgreek' : 'mac_greek',
445n/a
446n/a # mac_iceland codec
447n/a 'maciceland' : 'mac_iceland',
448n/a
449n/a # mac_latin2 codec
450n/a 'maccentraleurope' : 'mac_latin2',
451n/a 'maclatin2' : 'mac_latin2',
452n/a
453n/a # mac_roman codec
454n/a 'macintosh' : 'mac_roman',
455n/a 'macroman' : 'mac_roman',
456n/a
457n/a # mac_turkish codec
458n/a 'macturkish' : 'mac_turkish',
459n/a
460n/a # mbcs codec
461n/a 'ansi' : 'mbcs',
462n/a 'dbcs' : 'mbcs',
463n/a
464n/a # ptcp154 codec
465n/a 'csptcp154' : 'ptcp154',
466n/a 'pt154' : 'ptcp154',
467n/a 'cp154' : 'ptcp154',
468n/a 'cyrillic_asian' : 'ptcp154',
469n/a
470n/a # quopri_codec codec
471n/a 'quopri' : 'quopri_codec',
472n/a 'quoted_printable' : 'quopri_codec',
473n/a 'quotedprintable' : 'quopri_codec',
474n/a
475n/a # rot_13 codec
476n/a 'rot13' : 'rot_13',
477n/a
478n/a # shift_jis codec
479n/a 'csshiftjis' : 'shift_jis',
480n/a 'shiftjis' : 'shift_jis',
481n/a 'sjis' : 'shift_jis',
482n/a 's_jis' : 'shift_jis',
483n/a
484n/a # shift_jis_2004 codec
485n/a 'shiftjis2004' : 'shift_jis_2004',
486n/a 'sjis_2004' : 'shift_jis_2004',
487n/a 's_jis_2004' : 'shift_jis_2004',
488n/a
489n/a # shift_jisx0213 codec
490n/a 'shiftjisx0213' : 'shift_jisx0213',
491n/a 'sjisx0213' : 'shift_jisx0213',
492n/a 's_jisx0213' : 'shift_jisx0213',
493n/a
494n/a # tactis codec
495n/a 'tis260' : 'tactis',
496n/a
497n/a # tis_620 codec
498n/a 'tis620' : 'tis_620',
499n/a 'tis_620_0' : 'tis_620',
500n/a 'tis_620_2529_0' : 'tis_620',
501n/a 'tis_620_2529_1' : 'tis_620',
502n/a 'iso_ir_166' : 'tis_620',
503n/a
504n/a # utf_16 codec
505n/a 'u16' : 'utf_16',
506n/a 'utf16' : 'utf_16',
507n/a
508n/a # utf_16_be codec
509n/a 'unicodebigunmarked' : 'utf_16_be',
510n/a 'utf_16be' : 'utf_16_be',
511n/a
512n/a # utf_16_le codec
513n/a 'unicodelittleunmarked' : 'utf_16_le',
514n/a 'utf_16le' : 'utf_16_le',
515n/a
516n/a # utf_32 codec
517n/a 'u32' : 'utf_32',
518n/a 'utf32' : 'utf_32',
519n/a
520n/a # utf_32_be codec
521n/a 'utf_32be' : 'utf_32_be',
522n/a
523n/a # utf_32_le codec
524n/a 'utf_32le' : 'utf_32_le',
525n/a
526n/a # utf_7 codec
527n/a 'u7' : 'utf_7',
528n/a 'utf7' : 'utf_7',
529n/a 'unicode_1_1_utf_7' : 'utf_7',
530n/a
531n/a # utf_8 codec
532n/a 'u8' : 'utf_8',
533n/a 'utf' : 'utf_8',
534n/a 'utf8' : 'utf_8',
535n/a 'utf8_ucs2' : 'utf_8',
536n/a 'utf8_ucs4' : 'utf_8',
537n/a
538n/a # uu_codec codec
539n/a 'uu' : 'uu_codec',
540n/a
541n/a # zlib_codec codec
542n/a 'zip' : 'zlib_codec',
543n/a 'zlib' : 'zlib_codec',
544n/a
545n/a # temporary mac CJK aliases, will be replaced by proper codecs in 3.1
546n/a 'x_mac_japanese' : 'shift_jis',
547n/a 'x_mac_korean' : 'euc_kr',
548n/a 'x_mac_simp_chinese' : 'gb2312',
549n/a 'x_mac_trad_chinese' : 'big5',
550n/a}