Home | History | Annotate | Download | only in encoding
      1 This tests decoding characters in various character sets.
      2 
      3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
      4 
      5 
      6 PASS decode('UTF-8', '%E2%88%9A') is 'U+221A'
      7 PASS decode('gb2312', '%A3%A0') is 'U+3000'
      8 PASS decode('gb_2312-80', '%A3%A0') is 'U+3000'
      9 PASS decode('chinese', '%A3%A0') is 'U+3000'
     10 PASS decode('gbk', '%A3%A0') is 'U+3000'
     11 PASS decode('gb18030', '%A3%A0') is 'U+3000'
     12 PASS decode('EUC-CN', '%A3%A0') is 'U+3000'
     13 PASS decode('Shift_JIS', '%82%d0') is 'U+3072'
     14 PASS decode('shift-jis', '%82%d0') is 'U+3072'
     15 PASS decode('korean', '%A2%E6') is 'U+20AC'
     16 PASS decode('korean', '%A1%A4') is 'U+00B7'
     17 PASS decode('korean', '%A1%A9') is 'U+00AD'
     18 PASS decode('korean', '%A1%AA') is 'U+2015'
     19 PASS decode('korean', '%A1%AD') is 'U+223C'
     20 PASS decode('korean', '%A2%A6') is 'U+FF5E'
     21 PASS decode('korean', '%A2%C1') is 'U+2299'
     22 PASS decode('korean', '%1A') is 'U+001A'
     23 PASS decode('korean', '%1C') is 'U+001C'
     24 PASS decode('korean', '%8F%A1') is 'U+B8EA'
     25 PASS decode('korean', '%B4%D3') is 'U+B2D2'
     26 PASS decode('korean', '%A2%41') is 'U+C910'
     27 PASS decode('EUC-KR', '%A2%E6') is 'U+20AC'
     28 PASS decode('EUC-KR', '%A1%A4') is 'U+00B7'
     29 PASS decode('EUC-KR', '%A1%A9') is 'U+00AD'
     30 PASS decode('EUC-KR', '%A1%AA') is 'U+2015'
     31 PASS decode('EUC-KR', '%A1%AD') is 'U+223C'
     32 PASS decode('EUC-KR', '%A2%A6') is 'U+FF5E'
     33 PASS decode('EUC-KR', '%A2%C1') is 'U+2299'
     34 PASS decode('EUC-KR', '%1A') is 'U+001A'
     35 PASS decode('EUC-KR', '%1C') is 'U+001C'
     36 PASS decode('EUC-KR', '%8F%A1') is 'U+B8EA'
     37 PASS decode('EUC-KR', '%B4%D3') is 'U+B2D2'
     38 PASS decode('EUC-KR', '%A2%41') is 'U+C910'
     39 PASS decode('windows-949', '%A2%E6') is 'U+20AC'
     40 PASS decode('windows-949', '%A1%A4') is 'U+00B7'
     41 PASS decode('windows-949', '%A1%A9') is 'U+00AD'
     42 PASS decode('windows-949', '%A1%AA') is 'U+2015'
     43 PASS decode('windows-949', '%A1%AD') is 'U+223C'
     44 PASS decode('windows-949', '%A2%A6') is 'U+FF5E'
     45 PASS decode('windows-949', '%A2%C1') is 'U+2299'
     46 PASS decode('windows-949', '%1A') is 'U+001A'
     47 PASS decode('windows-949', '%1C') is 'U+001C'
     48 PASS decode('windows-949', '%8F%A1') is 'U+B8EA'
     49 PASS decode('windows-949', '%B4%D3') is 'U+B2D2'
     50 PASS decode('windows-949', '%A2%41') is 'U+C910'
     51 PASS decode('x-windows-949', '%A2%E6') is 'U+20AC'
     52 PASS decode('x-windows-949', '%A1%A4') is 'U+00B7'
     53 PASS decode('x-windows-949', '%A1%A9') is 'U+00AD'
     54 PASS decode('x-windows-949', '%A1%AA') is 'U+2015'
     55 PASS decode('x-windows-949', '%A1%AD') is 'U+223C'
     56 PASS decode('x-windows-949', '%A2%A6') is 'U+FF5E'
     57 PASS decode('x-windows-949', '%A2%C1') is 'U+2299'
     58 PASS decode('x-windows-949', '%1A') is 'U+001A'
     59 PASS decode('x-windows-949', '%1C') is 'U+001C'
     60 PASS decode('x-windows-949', '%8F%A1') is 'U+B8EA'
     61 PASS decode('x-windows-949', '%B4%D3') is 'U+B2D2'
     62 PASS decode('x-windows-949', '%A2%41') is 'U+C910'
     63 PASS decode('x-uhc', '%A2%E6') is 'U+20AC'
     64 PASS decode('x-uhc', '%A1%A4') is 'U+00B7'
     65 PASS decode('x-uhc', '%A1%A9') is 'U+00AD'
     66 PASS decode('x-uhc', '%A1%AA') is 'U+2015'
     67 PASS decode('x-uhc', '%A1%AD') is 'U+223C'
     68 PASS decode('x-uhc', '%A2%A6') is 'U+FF5E'
     69 PASS decode('x-uhc', '%A2%C1') is 'U+2299'
     70 PASS decode('x-uhc', '%1A') is 'U+001A'
     71 PASS decode('x-uhc', '%1C') is 'U+001C'
     72 PASS decode('x-uhc', '%8F%A1') is 'U+B8EA'
     73 PASS decode('x-uhc', '%B4%D3') is 'U+B2D2'
     74 PASS decode('x-uhc', '%A2%41') is 'U+C910'
     75 PASS decode('iso-ir-149', '%A2%E6') is 'U+20AC'
     76 PASS decode('iso-ir-149', '%A1%A4') is 'U+00B7'
     77 PASS decode('iso-ir-149', '%A1%A9') is 'U+00AD'
     78 PASS decode('iso-ir-149', '%A1%AA') is 'U+2015'
     79 PASS decode('iso-ir-149', '%A1%AD') is 'U+223C'
     80 PASS decode('iso-ir-149', '%A2%A6') is 'U+FF5E'
     81 PASS decode('iso-ir-149', '%A2%C1') is 'U+2299'
     82 PASS decode('iso-ir-149', '%1A') is 'U+001A'
     83 PASS decode('iso-ir-149', '%1C') is 'U+001C'
     84 PASS decode('iso-ir-149', '%8F%A1') is 'U+B8EA'
     85 PASS decode('iso-ir-149', '%B4%D3') is 'U+B2D2'
     86 PASS decode('iso-ir-149', '%A2%41') is 'U+C910'
     87 PASS decode('KS_C_5601-1987', '%A2%E6') is 'U+20AC'
     88 PASS decode('KS_C_5601-1987', '%A1%A4') is 'U+00B7'
     89 PASS decode('KS_C_5601-1987', '%A1%A9') is 'U+00AD'
     90 PASS decode('KS_C_5601-1987', '%A1%AA') is 'U+2015'
     91 PASS decode('KS_C_5601-1987', '%A1%AD') is 'U+223C'
     92 PASS decode('KS_C_5601-1987', '%A2%A6') is 'U+FF5E'
     93 PASS decode('KS_C_5601-1987', '%A2%C1') is 'U+2299'
     94 PASS decode('KS_C_5601-1987', '%1A') is 'U+001A'
     95 PASS decode('KS_C_5601-1987', '%1C') is 'U+001C'
     96 PASS decode('KS_C_5601-1987', '%8F%A1') is 'U+B8EA'
     97 PASS decode('KS_C_5601-1987', '%B4%D3') is 'U+B2D2'
     98 PASS decode('KS_C_5601-1987', '%A2%41') is 'U+C910'
     99 PASS decode('KS_C_5601-1989', '%A2%E6') is 'U+20AC'
    100 PASS decode('KS_C_5601-1989', '%A1%A4') is 'U+00B7'
    101 PASS decode('KS_C_5601-1989', '%A1%A9') is 'U+00AD'
    102 PASS decode('KS_C_5601-1989', '%A1%AA') is 'U+2015'
    103 PASS decode('KS_C_5601-1989', '%A1%AD') is 'U+223C'
    104 PASS decode('KS_C_5601-1989', '%A2%A6') is 'U+FF5E'
    105 PASS decode('KS_C_5601-1989', '%A2%C1') is 'U+2299'
    106 PASS decode('KS_C_5601-1989', '%1A') is 'U+001A'
    107 PASS decode('KS_C_5601-1989', '%1C') is 'U+001C'
    108 PASS decode('KS_C_5601-1989', '%8F%A1') is 'U+B8EA'
    109 PASS decode('KS_C_5601-1989', '%B4%D3') is 'U+B2D2'
    110 PASS decode('KS_C_5601-1989', '%A2%41') is 'U+C910'
    111 PASS decode('iso-8859-9', '%80') is 'U+20AC'
    112 PASS decode('iso-8859-9', '%9F') is 'U+0178'
    113 PASS decode('iso-8859-9', '%FD') is 'U+0131'
    114 PASS decode('latin5', '%80') is 'U+20AC'
    115 PASS decode('latin5', '%9F') is 'U+0178'
    116 PASS decode('latin5', '%FD') is 'U+0131'
    117 PASS decode('windows-1254', '%80') is 'U+20AC'
    118 PASS decode('windows-1254', '%9F') is 'U+0178'
    119 PASS decode('windows-1254', '%FD') is 'U+0131'
    120 PASS decode('ISO-8859-13', '%A1') is 'U+201D'
    121 PASS decode('ISO-8859-13', '%A5') is 'U+201E'
    122 PASS decode('ISO-8859-13', '%B4') is 'U+201C'
    123 PASS decode('ISO-8859-13', '%FF') is 'U+2019'
    124 PASS decode('windows-1257', '%80') is 'U+20AC'
    125 PASS decode('windows-1257', '%B4') is 'U+00B4'
    126 PASS decode('windows-1257', '%FF') is 'U+02D9'
    127 PASS decode('iso-8859-7', '%A1') is 'U+2018'
    128 PASS decode('iso-8859-7', '%B5') is 'U+0385'
    129 PASS decode('iso-8859-7', '%B6') is 'U+0386'
    130 PASS decode('windows-1253', '%80') is 'U+20AC'
    131 PASS decode('windows-1253', '%A1') is 'U+0385'
    132 PASS decode('windows-1253', '%B5') is 'U+00B5'
    133 PASS decode('windows-1253', '%B6') is 'U+00B6'
    134 PASS decode('KOI8-R', '%A4') is 'U+2553'
    135 PASS decode('KOI8-R', '%AD') is 'U+255C'
    136 PASS decode('KOI8-U', '%A4') is 'U+0454'
    137 PASS decode('KOI8-U', '%AD') is 'U+0491'
    138 PASS decode('TIS-620', '%80') is 'U+20AC'
    139 PASS decode('TIS-620', '%96') is 'U+2013'
    140 PASS decode('TIS-620', '%A0') is 'U+00A0'
    141 PASS decode('TIS-620', '%A1') is 'U+0E01'
    142 PASS decode('TIS-620', '%DB') is 'U+F8C1'
    143 PASS decode('ISO-8859-11', '%80') is 'U+20AC'
    144 PASS decode('ISO-8859-11', '%96') is 'U+2013'
    145 PASS decode('ISO-8859-11', '%A0') is 'U+00A0'
    146 PASS decode('ISO-8859-11', '%A1') is 'U+0E01'
    147 PASS decode('ISO-8859-11', '%DB') is 'U+F8C1'
    148 PASS decode('windows-874', '%80') is 'U+20AC'
    149 PASS decode('windows-874', '%96') is 'U+2013'
    150 PASS decode('windows-874', '%A0') is 'U+00A0'
    151 PASS decode('windows-874', '%A1') is 'U+0E01'
    152 PASS decode('windows-874', '%DB') is 'U+F8C1'
    153 PASS decode('dos-874', '%80') is 'U+20AC'
    154 PASS decode('dos-874', '%96') is 'U+2013'
    155 PASS decode('dos-874', '%A0') is 'U+00A0'
    156 PASS decode('dos-874', '%A1') is 'U+0E01'
    157 PASS decode('dos-874', '%DB') is 'U+F8C1'
    158 PASS decode('UTF-7', '+AD4') is 'U+002B/U+0041/U+0044/U+0034'
    159 PASS decode('utf-7', '+AD4') is 'U+002B/U+0041/U+0044/U+0034'
    160 PASS decode('UTF-16LE', '%69%D8%D6%DE') is 'U+D869/U+DED6'
    161 PASS decode('unicodeFEFF', '%69%D8%D6%DE') is 'U+D869/U+DED6'
    162 PASS decode('UTF-16', '%69%D8%D6%DE') is 'U+D869/U+DED6'
    163 PASS decode('ISO-10646-UCS-2', '%69%D8%D6%DE') is 'U+D869/U+DED6'
    164 PASS decode('UCS-2', '%69%D8%D6%DE') is 'U+D869/U+DED6'
    165 PASS decode('Unicode', '%69%D8%D6%DE') is 'U+D869/U+DED6'
    166 PASS decode('csUnicode', '%69%D8%D6%DE') is 'U+D869/U+DED6'
    167 PASS decode('UTF-16BE', '%D8%69%DE%D6') is 'U+D869/U+DED6'
    168 PASS decode('unicodeFFFE', '%D8%69%DE%D6') is 'U+D869/U+DED6'
    169 PASS successfullyParsed is true
    170 
    171 TEST COMPLETE
    172 
    173