encoding aliases support this module is used by the encodings package search function to map encodings names to module names note that the search function normalizes the encoding names before doing the lookup so the mapping will have to map normalized encoding names to module names contents the following aliases dictionary contains mappings of all iana character set names for which the python core library provides codecs in addition to these a few python specific codec aliases have also been added please keep this list sorted alphabetically by value ascii codec base64codec codec big5 codec big5hkscs codec bz2codec codec cp037 codec cp1026 codec cp1125 codec cp1140 codec cp1250 codec cp1251 codec cp1252 codec cp1253 codec cp1254 codec cp1255 codec cp1256 codec cp1257 codec cp1258 codec cp273 codec cp424 codec cp437 codec cp500 codec cp775 codec cp850 codec cp852 codec cp855 codec cp857 codec cp858 codec cp860 codec cp861 codec cp862 codec cp863 codec cp864 codec cp865 codec cp866 codec cp869 codec cp932 codec cp949 codec cp950 codec eucjis2004 codec eucjisx0213 codec eucjp codec euckr codec gb18030 codec gb2312 codec gbk codec hexcodec codec hproman8 codec hz codec iso2022jp codec iso2022jp1 codec iso2022jp2 codec iso2022jp2004 codec iso2022jp3 codec iso2022jpext codec iso2022kr codec iso885910 codec iso885911 codec iso885913 codec iso885914 codec iso885915 codec iso885916 codec iso88592 codec iso88593 codec iso88594 codec iso88595 codec iso88596 codec iso88597 codec iso88598 codec iso88599 codec johab codec koi8r codec kz1048 codec latin1 codec note that the latin1 codec is implemented internally in c and a lot faster than the charmap codec iso88591 which uses the same encoding this is why we discourage the use of the iso88591 codec and alias it to latin1 instead maccyrillic codec macgreek codec maciceland codec maclatin2 codec macroman codec macturkish codec mbcs codec ptcp154 codec quopricodec codec rot13 codec shiftjis codec shiftjis2004 codec shiftjisx0213 codec tis620 codec utf16 codec utf16be codec utf16le codec utf32 codec utf32be codec utf32le codec utf7 codec utf8 codec uucodec codec zlibcodec codec temporary mac cjk aliases will be replaced by proper codecs in 3 1 please keep this list sorted alphabetically by value ascii codec some email headers use this non standard name base64_codec codec big5 codec big5hkscs codec bz2_codec codec cp037 codec cp1026 codec cp1125 codec cp1140 codec cp1250 codec cp1251 codec cp1252 codec cp1253 codec cp1254 codec cp1255 codec cp1256 codec cp1257 codec cp1258 codec cp273 codec cp424 codec cp437 codec cp500 codec cp775 codec cp850 codec cp852 codec cp855 codec cp857 codec cp858 codec cp860 codec cp861 codec cp862 codec cp863 codec cp864 codec cp865 codec cp866 codec cp869 codec cp932 codec cp949 codec cp950 codec euc_jis_2004 codec euc_jisx0213 codec euc_jp codec euc_kr codec gb18030 codec gb2312 codec gbk codec hex_codec codec hp_roman8 codec hz codec iso2022_jp codec iso2022_jp_1 codec iso2022_jp_2 codec iso2022_jp_2004 codec iso2022_jp_3 codec iso2022_jp_ext codec iso2022_kr codec iso8859_10 codec iso8859_11 codec iso8859_13 codec iso8859_14 codec iso8859_15 codec iso8859_16 codec iso8859_2 codec iso8859_3 codec iso8859_4 codec iso8859_5 codec iso8859_6 codec iso8859_7 codec iso8859_8 codec iso8859_9 codec johab codec koi8_r codec kz1048 codec latin_1 codec note that the latin_1 codec is implemented internally in c and a lot faster than the charmap codec iso8859_1 which uses the same encoding this is why we discourage the use of the iso8859_1 codec and alias it to latin_1 instead mac_cyrillic codec mac_greek codec mac_iceland codec mac_latin2 codec mac_roman codec mac_turkish codec mbcs codec ptcp154 codec quopri_codec codec rot_13 codec shift_jis codec shift_jis_2004 codec shift_jisx0213 codec tis_620 codec utf_16 codec utf_16_be codec utf_16_le codec utf_32 codec utf_32_be codec utf_32_le codec utf_7 codec utf_8 codec uu_codec codec zlib_codec codec temporary mac cjk aliases will be replaced by proper codecs in 3 1
aliases = {

    

    
    '646'                : 'ascii',
    'ansi_x3.4_1968'     : 'ascii',
    'ansi_x3_4_1968'     : 'ascii', 
    'ansi_x3.4_1986'     : 'ascii',
    'cp367'              : 'ascii',
    'csascii'            : 'ascii',
    'ibm367'             : 'ascii',
    'iso646_us'          : 'ascii',
    'iso_646.irv_1991'   : 'ascii',
    'iso_ir_6'           : 'ascii',
    'us'                 : 'ascii',
    'us_ascii'           : 'ascii',

    
    'base64'             : 'base64_codec',
    'base_64'            : 'base64_codec',

    
    'big5_tw'            : 'big5',
    'csbig5'             : 'big5',

    
    'big5_hkscs'         : 'big5hkscs',
    'hkscs'              : 'big5hkscs',

    
    'bz2'                : 'bz2_codec',

    
    '037'                : 'cp037',
    'csibm037'           : 'cp037',
    'ebcdic_cp_ca'       : 'cp037',
    'ebcdic_cp_nl'       : 'cp037',
    'ebcdic_cp_us'       : 'cp037',
    'ebcdic_cp_wt'       : 'cp037',
    'ibm037'             : 'cp037',
    'ibm039'             : 'cp037',

    
    '1026'               : 'cp1026',
    'csibm1026'          : 'cp1026',
    'ibm1026'            : 'cp1026',

    
    '1125'                : 'cp1125',
    'ibm1125'             : 'cp1125',
    'cp866u'              : 'cp1125',
    'ruscii'              : 'cp1125',

    
    '1140'               : 'cp1140',
    'ibm1140'            : 'cp1140',

    
    '1250'               : 'cp1250',
    'windows_1250'       : 'cp1250',

    
    '1251'               : 'cp1251',
    'windows_1251'       : 'cp1251',

    
    '1252'               : 'cp1252',
    'windows_1252'       : 'cp1252',

    
    '1253'               : 'cp1253',
    'windows_1253'       : 'cp1253',

    
    '1254'               : 'cp1254',
    'windows_1254'       : 'cp1254',

    
    '1255'               : 'cp1255',
    'windows_1255'       : 'cp1255',

    
    '1256'               : 'cp1256',
    'windows_1256'       : 'cp1256',

    
    '1257'               : 'cp1257',
    'windows_1257'       : 'cp1257',

    
    '1258'               : 'cp1258',
    'windows_1258'       : 'cp1258',

    
    '273'                : 'cp273',
    'ibm273'             : 'cp273',
    'csibm273'           : 'cp273',

    
    '424'                : 'cp424',
    'csibm424'           : 'cp424',
    'ebcdic_cp_he'       : 'cp424',
    'ibm424'             : 'cp424',

    
    '437'                : 'cp437',
    'cspc8codepage437'   : 'cp437',
    'ibm437'             : 'cp437',

    
    '500'                : 'cp500',
    'csibm500'           : 'cp500',
    'ebcdic_cp_be'       : 'cp500',
    'ebcdic_cp_ch'       : 'cp500',
    'ibm500'             : 'cp500',

    
    '775'                : 'cp775',
    'cspc775baltic'      : 'cp775',
    'ibm775'             : 'cp775',

    
    '850'                : 'cp850',
    'cspc850multilingual' : 'cp850',
    'ibm850'             : 'cp850',

    
    '852'                : 'cp852',
    'cspcp852'           : 'cp852',
    'ibm852'             : 'cp852',

    
    '855'                : 'cp855',
    'csibm855'           : 'cp855',
    'ibm855'             : 'cp855',

    
    '857'                : 'cp857',
    'csibm857'           : 'cp857',
    'ibm857'             : 'cp857',

    
    '858'                : 'cp858',
    'csibm858'           : 'cp858',
    'ibm858'             : 'cp858',

    
    '860'                : 'cp860',
    'csibm860'           : 'cp860',
    'ibm860'             : 'cp860',

    
    '861'                : 'cp861',
    'cp_is'              : 'cp861',
    'csibm861'           : 'cp861',
    'ibm861'             : 'cp861',

    
    '862'                : 'cp862',
    'cspc862latinhebrew' : 'cp862',
    'ibm862'             : 'cp862',

    
    '863'                : 'cp863',
    'csibm863'           : 'cp863',
    'ibm863'             : 'cp863',

    
    '864'                : 'cp864',
    'csibm864'           : 'cp864',
    'ibm864'             : 'cp864',

    
    '865'                : 'cp865',
    'csibm865'           : 'cp865',
    'ibm865'             : 'cp865',

    
    '866'                : 'cp866',
    'csibm866'           : 'cp866',
    'ibm866'             : 'cp866',

    
    '869'                : 'cp869',
    'cp_gr'              : 'cp869',
    'csibm869'           : 'cp869',
    'ibm869'             : 'cp869',

    
    '932'                : 'cp932',
    'ms932'              : 'cp932',
    'mskanji'            : 'cp932',
    'ms_kanji'           : 'cp932',

    
    '949'                : 'cp949',
    'ms949'              : 'cp949',
    'uhc'                : 'cp949',

    
    '950'                : 'cp950',
    'ms950'              : 'cp950',

    
    'jisx0213'           : 'euc_jis_2004',
    'eucjis2004'         : 'euc_jis_2004',
    'euc_jis2004'        : 'euc_jis_2004',

    
    'eucjisx0213'        : 'euc_jisx0213',

    
    'eucjp'              : 'euc_jp',
    'ujis'               : 'euc_jp',
    'u_jis'              : 'euc_jp',

    
    'euckr'              : 'euc_kr',
    'korean'             : 'euc_kr',
    'ksc5601'            : 'euc_kr',
    'ks_c_5601'          : 'euc_kr',
    'ks_c_5601_1987'     : 'euc_kr',
    'ksx1001'            : 'euc_kr',
    'ks_x_1001'          : 'euc_kr',

    
    'gb18030_2000'       : 'gb18030',

    
    'chinese'            : 'gb2312',
    'csiso58gb231280'    : 'gb2312',
    'euc_cn'             : 'gb2312',
    'euccn'              : 'gb2312',
    'eucgb2312_cn'       : 'gb2312',
    'gb2312_1980'        : 'gb2312',
    'gb2312_80'          : 'gb2312',
    'iso_ir_58'          : 'gb2312',

    
    '936'                : 'gbk',
    'cp936'              : 'gbk',
    'ms936'              : 'gbk',

    
    'hex'                : 'hex_codec',

    
    'roman8'             : 'hp_roman8',
    'r8'                 : 'hp_roman8',
    'csHPRoman8'         : 'hp_roman8',
    'cp1051'             : 'hp_roman8',
    'ibm1051'            : 'hp_roman8',

    
    'hzgb'               : 'hz',
    'hz_gb'              : 'hz',
    'hz_gb_2312'         : 'hz',

    
    'csiso2022jp'        : 'iso2022_jp',
    'iso2022jp'          : 'iso2022_jp',
    'iso_2022_jp'        : 'iso2022_jp',

    
    'iso2022jp_1'        : 'iso2022_jp_1',
    'iso_2022_jp_1'      : 'iso2022_jp_1',

    
    'iso2022jp_2'        : 'iso2022_jp_2',
    'iso_2022_jp_2'      : 'iso2022_jp_2',

    
    'iso_2022_jp_2004'   : 'iso2022_jp_2004',
    'iso2022jp_2004'     : 'iso2022_jp_2004',

    
    'iso2022jp_3'        : 'iso2022_jp_3',
    'iso_2022_jp_3'      : 'iso2022_jp_3',

    
    'iso2022jp_ext'      : 'iso2022_jp_ext',
    'iso_2022_jp_ext'    : 'iso2022_jp_ext',

    
    'csiso2022kr'        : 'iso2022_kr',
    'iso2022kr'          : 'iso2022_kr',
    'iso_2022_kr'        : 'iso2022_kr',

    
    'csisolatin6'        : 'iso8859_10',
    'iso_8859_10'        : 'iso8859_10',
    'iso_8859_10_1992'   : 'iso8859_10',
    'iso_ir_157'         : 'iso8859_10',
    'l6'                 : 'iso8859_10',
    'latin6'             : 'iso8859_10',

    
    'thai'               : 'iso8859_11',
    'iso_8859_11'        : 'iso8859_11',
    'iso_8859_11_2001'   : 'iso8859_11',

    
    'iso_8859_13'        : 'iso8859_13',
    'l7'                 : 'iso8859_13',
    'latin7'             : 'iso8859_13',

    
    'iso_8859_14'        : 'iso8859_14',
    'iso_8859_14_1998'   : 'iso8859_14',
    'iso_celtic'         : 'iso8859_14',
    'iso_ir_199'         : 'iso8859_14',
    'l8'                 : 'iso8859_14',
    'latin8'             : 'iso8859_14',

    
    'iso_8859_15'        : 'iso8859_15',
    'l9'                 : 'iso8859_15',
    'latin9'             : 'iso8859_15',

    
    'iso_8859_16'        : 'iso8859_16',
    'iso_8859_16_2001'   : 'iso8859_16',
    'iso_ir_226'         : 'iso8859_16',
    'l10'                : 'iso8859_16',
    'latin10'            : 'iso8859_16',

    
    'csisolatin2'        : 'iso8859_2',
    'iso_8859_2'         : 'iso8859_2',
    'iso_8859_2_1987'    : 'iso8859_2',
    'iso_ir_101'         : 'iso8859_2',
    'l2'                 : 'iso8859_2',
    'latin2'             : 'iso8859_2',

    
    'csisolatin3'        : 'iso8859_3',
    'iso_8859_3'         : 'iso8859_3',
    'iso_8859_3_1988'    : 'iso8859_3',
    'iso_ir_109'         : 'iso8859_3',
    'l3'                 : 'iso8859_3',
    'latin3'             : 'iso8859_3',

    
    'csisolatin4'        : 'iso8859_4',
    'iso_8859_4'         : 'iso8859_4',
    'iso_8859_4_1988'    : 'iso8859_4',
    'iso_ir_110'         : 'iso8859_4',
    'l4'                 : 'iso8859_4',
    'latin4'             : 'iso8859_4',

    
    'csisolatincyrillic' : 'iso8859_5',
    'cyrillic'           : 'iso8859_5',
    'iso_8859_5'         : 'iso8859_5',
    'iso_8859_5_1988'    : 'iso8859_5',
    'iso_ir_144'         : 'iso8859_5',

    
    'arabic'             : 'iso8859_6',
    'asmo_708'           : 'iso8859_6',
    'csisolatinarabic'   : 'iso8859_6',
    'ecma_114'           : 'iso8859_6',
    'iso_8859_6'         : 'iso8859_6',
    'iso_8859_6_1987'    : 'iso8859_6',
    'iso_ir_127'         : 'iso8859_6',

    
    'csisolatingreek'    : 'iso8859_7',
    'ecma_118'           : 'iso8859_7',
    'elot_928'           : 'iso8859_7',
    'greek'              : 'iso8859_7',
    'greek8'             : 'iso8859_7',
    'iso_8859_7'         : 'iso8859_7',
    'iso_8859_7_1987'    : 'iso8859_7',
    'iso_ir_126'         : 'iso8859_7',

    
    'csisolatinhebrew'   : 'iso8859_8',
    'hebrew'             : 'iso8859_8',
    'iso_8859_8'         : 'iso8859_8',
    'iso_8859_8_1988'    : 'iso8859_8',
    'iso_ir_138'         : 'iso8859_8',

    
    'csisolatin5'        : 'iso8859_9',
    'iso_8859_9'         : 'iso8859_9',
    'iso_8859_9_1989'    : 'iso8859_9',
    'iso_ir_148'         : 'iso8859_9',
    'l5'                 : 'iso8859_9',
    'latin5'             : 'iso8859_9',

    
    'cp1361'             : 'johab',
    'ms1361'             : 'johab',

    
    'cskoi8r'            : 'koi8_r',

    
    'kz_1048'           : 'kz1048',
    'rk1048'            : 'kz1048',
    'strk1048_2002'     : 'kz1048',

    
    
    
    
    
    
    
    '8859'               : 'latin_1',
    'cp819'              : 'latin_1',
    'csisolatin1'        : 'latin_1',
    'ibm819'             : 'latin_1',
    'iso8859'            : 'latin_1',
    'iso8859_1'          : 'latin_1',
    'iso_8859_1'         : 'latin_1',
    'iso_8859_1_1987'    : 'latin_1',
    'iso_ir_100'         : 'latin_1',
    'l1'                 : 'latin_1',
    'latin'              : 'latin_1',
    'latin1'             : 'latin_1',

    
    'maccyrillic'        : 'mac_cyrillic',

    
    'macgreek'           : 'mac_greek',

    
    'maciceland'         : 'mac_iceland',

    
    'maccentraleurope'   : 'mac_latin2',
    'mac_centeuro'       : 'mac_latin2',
    'maclatin2'          : 'mac_latin2',

    
    'macintosh'          : 'mac_roman',
    'macroman'           : 'mac_roman',

    
    'macturkish'         : 'mac_turkish',

    
    'ansi'               : 'mbcs',
    'dbcs'               : 'mbcs',

    
    'csptcp154'          : 'ptcp154',
    'pt154'              : 'ptcp154',
    'cp154'              : 'ptcp154',
    'cyrillic_asian'     : 'ptcp154',

    
    'quopri'             : 'quopri_codec',
    'quoted_printable'   : 'quopri_codec',
    'quotedprintable'    : 'quopri_codec',

    
    'rot13'              : 'rot_13',

    
    'csshiftjis'         : 'shift_jis',
    'shiftjis'           : 'shift_jis',
    'sjis'               : 'shift_jis',
    's_jis'              : 'shift_jis',

    
    'shiftjis2004'       : 'shift_jis_2004',
    'sjis_2004'          : 'shift_jis_2004',
    's_jis_2004'         : 'shift_jis_2004',

    
    'shiftjisx0213'      : 'shift_jisx0213',
    'sjisx0213'          : 'shift_jisx0213',
    's_jisx0213'         : 'shift_jisx0213',

    
    'tis620'             : 'tis_620',
    'tis_620_0'          : 'tis_620',
    'tis_620_2529_0'     : 'tis_620',
    'tis_620_2529_1'     : 'tis_620',
    'iso_ir_166'         : 'tis_620',

    
    'u16'                : 'utf_16',
    'utf16'              : 'utf_16',

    
    'unicodebigunmarked' : 'utf_16_be',
    'utf_16be'           : 'utf_16_be',

    
    'unicodelittleunmarked' : 'utf_16_le',
    'utf_16le'           : 'utf_16_le',

    
    'u32'                : 'utf_32',
    'utf32'              : 'utf_32',

    
    'utf_32be'           : 'utf_32_be',

    
    'utf_32le'           : 'utf_32_le',

    
    'u7'                 : 'utf_7',
    'utf7'               : 'utf_7',
    'unicode_1_1_utf_7'  : 'utf_7',

    
    'u8'                 : 'utf_8',
    'utf'                : 'utf_8',
    'utf8'               : 'utf_8',
    'utf8_ucs2'          : 'utf_8',
    'utf8_ucs4'          : 'utf_8',
    'cp65001'            : 'utf_8',

    
    'uu'                 : 'uu_codec',

    
    'zip'                : 'zlib_codec',
    'zlib'               : 'zlib_codec',

    
    'x_mac_japanese'      : 'shift_jis',
    'x_mac_korean'        : 'euc_kr',
    'x_mac_simp_chinese'  : 'gb2312',
    'x_mac_trad_chinese'  : 'big5',
}