0001 """ Encoding Aliases Support 0002 0003 This module is used by the encodings package search function to 0004 map encodings names to module names. 0005 0006 Note that the search function normalizes the encoding names before 0007 doing the lookup, so the mapping will have to map normalized 0008 encoding names to module names. 0009 0010 Contents: 0011 0012 The following aliases dictionary contains mappings of all IANA 0013 character set names for which the Python core library provides 0014 codecs. In addition to these, a few Python specific codec 0015 aliases have also been added. 0016 0017 """ 0018 aliases = { 0019 0020 # Please keep this list sorted alphabetically by value ! 0021 0022 # ascii codec 0023 '646' : 'ascii', 0024 'ansi_x3.4_1968' : 'ascii', 0025 'ansi_x3_4_1968' : 'ascii', # some email headers use this non-standard name 0026 'ansi_x3.4_1986' : 'ascii', 0027 'cp367' : 'ascii', 0028 'csascii' : 'ascii', 0029 'ibm367' : 'ascii', 0030 'iso646_us' : 'ascii', 0031 'iso_646.irv_1991' : 'ascii', 0032 'iso_ir_6' : 'ascii', 0033 'us' : 'ascii', 0034 'us_ascii' : 'ascii', 0035 0036 # base64_codec codec 0037 'base64' : 'base64_codec', 0038 'base_64' : 'base64_codec', 0039 0040 # big5 codec 0041 'big5_tw' : 'big5', 0042 'csbig5' : 'big5', 0043 0044 # big5hkscs codec 0045 'big5_hkscs' : 'big5hkscs', 0046 'hkscs' : 'big5hkscs', 0047 0048 # bz2_codec codec 0049 'bz2' : 'bz2_codec', 0050 0051 # cp037 codec 0052 '037' : 'cp037', 0053 'csibm037' : 'cp037', 0054 'ebcdic_cp_ca' : 'cp037', 0055 'ebcdic_cp_nl' : 'cp037', 0056 'ebcdic_cp_us' : 'cp037', 0057 'ebcdic_cp_wt' : 'cp037', 0058 'ibm037' : 'cp037', 0059 'ibm039' : 'cp037', 0060 0061 # cp1026 codec 0062 '1026' : 'cp1026', 0063 'csibm1026' : 'cp1026', 0064 'ibm1026' : 'cp1026', 0065 0066 # cp1140 codec 0067 '1140' : 'cp1140', 0068 'ibm1140' : 'cp1140', 0069 0070 # cp1250 codec 0071 '1250' : 'cp1250', 0072 'windows_1250' : 'cp1250', 0073 0074 # cp1251 codec 0075 '1251' : 'cp1251', 0076 'windows_1251' : 'cp1251', 0077 0078 # cp1252 codec 0079 '1252' : 'cp1252', 0080 'windows_1252' : 'cp1252', 0081 0082 # cp1253 codec 0083 '1253' : 'cp1253', 0084 'windows_1253' : 'cp1253', 0085 0086 # cp1254 codec 0087 '1254' : 'cp1254', 0088 'windows_1254' : 'cp1254', 0089 0090 # cp1255 codec 0091 '1255' : 'cp1255', 0092 'windows_1255' : 'cp1255', 0093 0094 # cp1256 codec 0095 '1256' : 'cp1256', 0096 'windows_1256' : 'cp1256', 0097 0098 # cp1257 codec 0099 '1257' : 'cp1257', 0100 'windows_1257' : 'cp1257', 0101 0102 # cp1258 codec 0103 '1258' : 'cp1258', 0104 'windows_1258' : 'cp1258', 0105 0106 # cp424 codec 0107 '424' : 'cp424', 0108 'csibm424' : 'cp424', 0109 'ebcdic_cp_he' : 'cp424', 0110 'ibm424' : 'cp424', 0111 0112 # cp437 codec 0113 '437' : 'cp437', 0114 'cspc8codepage437' : 'cp437', 0115 'ibm437' : 'cp437', 0116 0117 # cp500 codec 0118 '500' : 'cp500', 0119 'csibm500' : 'cp500', 0120 'ebcdic_cp_be' : 'cp500', 0121 'ebcdic_cp_ch' : 'cp500', 0122 'ibm500' : 'cp500', 0123 0124 # cp775 codec 0125 '775' : 'cp775', 0126 'cspc775baltic' : 'cp775', 0127 'ibm775' : 'cp775', 0128 0129 # cp850 codec 0130 '850' : 'cp850', 0131 'cspc850multilingual' : 'cp850', 0132 'ibm850' : 'cp850', 0133 0134 # cp852 codec 0135 '852' : 'cp852', 0136 'cspcp852' : 'cp852', 0137 'ibm852' : 'cp852', 0138 0139 # cp855 codec 0140 '855' : 'cp855', 0141 'csibm855' : 'cp855', 0142 'ibm855' : 'cp855', 0143 0144 # cp857 codec 0145 '857' : 'cp857', 0146 'csibm857' : 'cp857', 0147 'ibm857' : 'cp857', 0148 0149 # cp860 codec 0150 '860' : 'cp860', 0151 'csibm860' : 'cp860', 0152 'ibm860' : 'cp860', 0153 0154 # cp861 codec 0155 '861' : 'cp861', 0156 'cp_is' : 'cp861', 0157 'csibm861' : 'cp861', 0158 'ibm861' : 'cp861', 0159 0160 # cp862 codec 0161 '862' : 'cp862', 0162 'cspc862latinhebrew' : 'cp862', 0163 'ibm862' : 'cp862', 0164 0165 # cp863 codec 0166 '863' : 'cp863', 0167 'csibm863' : 'cp863', 0168 'ibm863' : 'cp863', 0169 0170 # cp864 codec 0171 '864' : 'cp864', 0172 'csibm864' : 'cp864', 0173 'ibm864' : 'cp864', 0174 0175 # cp865 codec 0176 '865' : 'cp865', 0177 'csibm865' : 'cp865', 0178 'ibm865' : 'cp865', 0179 0180 # cp866 codec 0181 '866' : 'cp866', 0182 'csibm866' : 'cp866', 0183 'ibm866' : 'cp866', 0184 0185 # cp869 codec 0186 '869' : 'cp869', 0187 'cp_gr' : 'cp869', 0188 'csibm869' : 'cp869', 0189 'ibm869' : 'cp869', 0190 0191 # cp932 codec 0192 '932' : 'cp932', 0193 'ms932' : 'cp932', 0194 'mskanji' : 'cp932', 0195 'ms_kanji' : 'cp932', 0196 0197 # cp949 codec 0198 '949' : 'cp949', 0199 'ms949' : 'cp949', 0200 'uhc' : 'cp949', 0201 0202 # cp950 codec 0203 '950' : 'cp950', 0204 'ms950' : 'cp950', 0205 0206 # euc_jis_2004 codec 0207 'jisx0213' : 'euc_jis_2004', 0208 'eucjis2004' : 'euc_jis_2004', 0209 'euc_jis2004' : 'euc_jis_2004', 0210 0211 # euc_jisx0213 codec 0212 'eucjisx0213' : 'euc_jisx0213', 0213 0214 # euc_jp codec 0215 'eucjp' : 'euc_jp', 0216 'ujis' : 'euc_jp', 0217 'u_jis' : 'euc_jp', 0218 0219 # euc_kr codec 0220 'euckr' : 'euc_kr', 0221 'korean' : 'euc_kr', 0222 'ksc5601' : 'euc_kr', 0223 'ks_c_5601' : 'euc_kr', 0224 'ks_c_5601_1987' : 'euc_kr', 0225 'ksx1001' : 'euc_kr', 0226 'ks_x_1001' : 'euc_kr', 0227 0228 # gb18030 codec 0229 'gb18030_2000' : 'gb18030', 0230 0231 # gb2312 codec 0232 'chinese' : 'gb2312', 0233 'csiso58gb231280' : 'gb2312', 0234 'euc_cn' : 'gb2312', 0235 'euccn' : 'gb2312', 0236 'eucgb2312_cn' : 'gb2312', 0237 'gb2312_1980' : 'gb2312', 0238 'gb2312_80' : 'gb2312', 0239 'iso_ir_58' : 'gb2312', 0240 0241 # gbk codec 0242 '936' : 'gbk', 0243 'cp936' : 'gbk', 0244 'ms936' : 'gbk', 0245 0246 # hex_codec codec 0247 'hex' : 'hex_codec', 0248 0249 # hp_roman8 codec 0250 'roman8' : 'hp_roman8', 0251 'r8' : 'hp_roman8', 0252 'csHPRoman8' : 'hp_roman8', 0253 0254 # hz codec 0255 'hzgb' : 'hz', 0256 'hz_gb' : 'hz', 0257 'hz_gb_2312' : 'hz', 0258 0259 # iso2022_jp codec 0260 'csiso2022jp' : 'iso2022_jp', 0261 'iso2022jp' : 'iso2022_jp', 0262 'iso_2022_jp' : 'iso2022_jp', 0263 0264 # iso2022_jp_1 codec 0265 'iso2022jp_1' : 'iso2022_jp_1', 0266 'iso_2022_jp_1' : 'iso2022_jp_1', 0267 0268 # iso2022_jp_2 codec 0269 'iso2022jp_2' : 'iso2022_jp_2', 0270 'iso_2022_jp_2' : 'iso2022_jp_2', 0271 0272 # iso2022_jp_2004 codec 0273 'iso_2022_jp_2004' : 'iso2022_jp_2004', 0274 'iso2022jp_2004' : 'iso2022_jp_2004', 0275 0276 # iso2022_jp_3 codec 0277 'iso2022jp_3' : 'iso2022_jp_3', 0278 'iso_2022_jp_3' : 'iso2022_jp_3', 0279 0280 # iso2022_jp_ext codec 0281 'iso2022jp_ext' : 'iso2022_jp_ext', 0282 'iso_2022_jp_ext' : 'iso2022_jp_ext', 0283 0284 # iso2022_kr codec 0285 'csiso2022kr' : 'iso2022_kr', 0286 'iso2022kr' : 'iso2022_kr', 0287 'iso_2022_kr' : 'iso2022_kr', 0288 0289 # iso8859_10 codec 0290 'csisolatin6' : 'iso8859_10', 0291 'iso_8859_10' : 'iso8859_10', 0292 'iso_8859_10_1992' : 'iso8859_10', 0293 'iso_ir_157' : 'iso8859_10', 0294 'l6' : 'iso8859_10', 0295 'latin6' : 'iso8859_10', 0296 0297 # iso8859_13 codec 0298 'iso_8859_13' : 'iso8859_13', 0299 0300 # iso8859_14 codec 0301 'iso_8859_14' : 'iso8859_14', 0302 'iso_8859_14_1998' : 'iso8859_14', 0303 'iso_celtic' : 'iso8859_14', 0304 'iso_ir_199' : 'iso8859_14', 0305 'l8' : 'iso8859_14', 0306 'latin8' : 'iso8859_14', 0307 0308 # iso8859_15 codec 0309 'iso_8859_15' : 'iso8859_15', 0310 0311 # iso8859_2 codec 0312 'csisolatin2' : 'iso8859_2', 0313 'iso_8859_2' : 'iso8859_2', 0314 'iso_8859_2_1987' : 'iso8859_2', 0315 'iso_ir_101' : 'iso8859_2', 0316 'l2' : 'iso8859_2', 0317 'latin2' : 'iso8859_2', 0318 0319 # iso8859_3 codec 0320 'csisolatin3' : 'iso8859_3', 0321 'iso_8859_3' : 'iso8859_3', 0322 'iso_8859_3_1988' : 'iso8859_3', 0323 'iso_ir_109' : 'iso8859_3', 0324 'l3' : 'iso8859_3', 0325 'latin3' : 'iso8859_3', 0326 0327 # iso8859_4 codec 0328 'csisolatin4' : 'iso8859_4', 0329 'iso_8859_4' : 'iso8859_4', 0330 'iso_8859_4_1988' : 'iso8859_4', 0331 'iso_ir_110' : 'iso8859_4', 0332 'l4' : 'iso8859_4', 0333 'latin4' : 'iso8859_4', 0334 0335 # iso8859_5 codec 0336 'csisolatincyrillic' : 'iso8859_5', 0337 'cyrillic' : 'iso8859_5', 0338 'iso_8859_5' : 'iso8859_5', 0339 'iso_8859_5_1988' : 'iso8859_5', 0340 'iso_ir_144' : 'iso8859_5', 0341 0342 # iso8859_6 codec 0343 'arabic' : 'iso8859_6', 0344 'asmo_708' : 'iso8859_6', 0345 'csisolatinarabic' : 'iso8859_6', 0346 'ecma_114' : 'iso8859_6', 0347 'iso_8859_6' : 'iso8859_6', 0348 'iso_8859_6_1987' : 'iso8859_6', 0349 'iso_ir_127' : 'iso8859_6', 0350 0351 # iso8859_7 codec 0352 'csisolatingreek' : 'iso8859_7', 0353 'ecma_118' : 'iso8859_7', 0354 'elot_928' : 'iso8859_7', 0355 'greek' : 'iso8859_7', 0356 'greek8' : 'iso8859_7', 0357 'iso_8859_7' : 'iso8859_7', 0358 'iso_8859_7_1987' : 'iso8859_7', 0359 'iso_ir_126' : 'iso8859_7', 0360 0361 # iso8859_8 codec 0362 'csisolatinhebrew' : 'iso8859_8', 0363 'hebrew' : 'iso8859_8', 0364 'iso_8859_8' : 'iso8859_8', 0365 'iso_8859_8_1988' : 'iso8859_8', 0366 'iso_ir_138' : 'iso8859_8', 0367 0368 # iso8859_9 codec 0369 'csisolatin5' : 'iso8859_9', 0370 'iso_8859_9' : 'iso8859_9', 0371 'iso_8859_9_1989' : 'iso8859_9', 0372 'iso_ir_148' : 'iso8859_9', 0373 'l5' : 'iso8859_9', 0374 'latin5' : 'iso8859_9', 0375 0376 # iso8859_11 codec 0377 'thai' : 'iso8859_11', 0378 'iso_8859_11' : 'iso8859_11', 0379 'iso_8859_11_2001' : 'iso8859_11', 0380 0381 # iso8859_16 codec 0382 'iso_8859_16' : 'iso8859_16', 0383 'iso_8859_16_2001' : 'iso8859_16', 0384 'iso_ir_226' : 'iso8859_16', 0385 'l10' : 'iso8859_16', 0386 'latin10' : 'iso8859_16', 0387 0388 # johab codec 0389 'cp1361' : 'johab', 0390 'ms1361' : 'johab', 0391 0392 # koi8_r codec 0393 'cskoi8r' : 'koi8_r', 0394 0395 # latin_1 codec 0396 '8859' : 'latin_1', 0397 'cp819' : 'latin_1', 0398 'csisolatin1' : 'latin_1', 0399 'ibm819' : 'latin_1', 0400 'iso8859' : 'latin_1', 0401 'iso_8859_1' : 'latin_1', 0402 'iso_8859_1_1987' : 'latin_1', 0403 'iso_ir_100' : 'latin_1', 0404 'l1' : 'latin_1', 0405 'latin' : 'latin_1', 0406 'latin1' : 'latin_1', 0407 0408 # mac_cyrillic codec 0409 'maccyrillic' : 'mac_cyrillic', 0410 0411 # mac_greek codec 0412 'macgreek' : 'mac_greek', 0413 0414 # mac_iceland codec 0415 'maciceland' : 'mac_iceland', 0416 0417 # mac_latin2 codec 0418 'maccentraleurope' : 'mac_latin2', 0419 'maclatin2' : 'mac_latin2', 0420 0421 # mac_roman codec 0422 'macroman' : 'mac_roman', 0423 0424 # mac_turkish codec 0425 'macturkish' : 'mac_turkish', 0426 0427 # mbcs codec 0428 'dbcs' : 'mbcs', 0429 0430 # ptcp154 codec 0431 'csptcp154' : 'ptcp154', 0432 'pt154' : 'ptcp154', 0433 'cp154' : 'ptcp154', 0434 'cyrillic-asian' : 'ptcp154', 0435 0436 # quopri_codec codec 0437 'quopri' : 'quopri_codec', 0438 'quoted_printable' : 'quopri_codec', 0439 'quotedprintable' : 'quopri_codec', 0440 0441 # rot_13 codec 0442 'rot13' : 'rot_13', 0443 0444 # shift_jis codec 0445 'csshiftjis' : 'shift_jis', 0446 'shiftjis' : 'shift_jis', 0447 'sjis' : 'shift_jis', 0448 's_jis' : 'shift_jis', 0449 0450 # shift_jis_2004 codec 0451 'shiftjis2004' : 'shift_jis_2004', 0452 'sjis_2004' : 'shift_jis_2004', 0453 's_jis_2004' : 'shift_jis_2004', 0454 0455 # shift_jisx0213 codec 0456 'shiftjisx0213' : 'shift_jisx0213', 0457 'sjisx0213' : 'shift_jisx0213', 0458 's_jisx0213' : 'shift_jisx0213', 0459 0460 # tactis codec 0461 'tis260' : 'tactis', 0462 0463 # tis_620 codec 0464 'tis620' : 'tis_620', 0465 'tis_620_0' : 'tis_620', 0466 'tis_620_2529_0' : 'tis_620', 0467 'tis_620_2529_1' : 'tis_620', 0468 'iso_ir_166' : 'tis_620', 0469 0470 # utf_16 codec 0471 'u16' : 'utf_16', 0472 'utf16' : 'utf_16', 0473 0474 # utf_16_be codec 0475 'unicodebigunmarked' : 'utf_16_be', 0476 'utf_16be' : 'utf_16_be', 0477 0478 # utf_16_le codec 0479 'unicodelittleunmarked' : 'utf_16_le', 0480 'utf_16le' : 'utf_16_le', 0481 0482 # utf_7 codec 0483 'u7' : 'utf_7', 0484 'utf7' : 'utf_7', 0485 0486 # utf_8 codec 0487 'u8' : 'utf_8', 0488 'utf' : 'utf_8', 0489 'utf8' : 'utf_8', 0490 'utf8_ucs2' : 'utf_8', 0491 'utf8_ucs4' : 'utf_8', 0492 0493 # uu_codec codec 0494 'uu' : 'uu_codec', 0495 0496 # zlib_codec codec 0497 'zip' : 'zlib_codec', 0498 'zlib' : 'zlib_codec', 0499 0500 } 0501
Generated by PyXR 0.9.4