OLD | NEW |
1 Supersets of ASCII decode ASCII correctly | 1 This is a testharness.js-based test. |
| 2 PASS ASCII superset encoding: iso-8859-2 |
| 3 PASS ASCII superset encoding: iso-8859-3 |
| 4 PASS ASCII superset encoding: iso-8859-4 |
| 5 PASS ASCII superset encoding: iso-8859-5 |
| 6 PASS ASCII superset encoding: iso-8859-6 |
| 7 PASS ASCII superset encoding: iso-8859-7 |
| 8 PASS ASCII superset encoding: iso-8859-8 |
| 9 PASS ASCII superset encoding: iso-8859-8-i |
| 10 PASS ASCII superset encoding: iso-8859-10 |
| 11 PASS ASCII superset encoding: iso-8859-13 |
| 12 PASS ASCII superset encoding: iso-8859-14 |
| 13 PASS ASCII superset encoding: iso-8859-15 |
| 14 PASS ASCII superset encoding: iso-8859-16 |
| 15 PASS ASCII superset encoding: koi8-r |
| 16 PASS ASCII superset encoding: koi8-u |
| 17 PASS ASCII superset encoding: macintosh |
| 18 PASS ASCII superset encoding: windows-874 |
| 19 PASS ASCII superset encoding: windows-1250 |
| 20 PASS ASCII superset encoding: windows-1251 |
| 21 PASS ASCII superset encoding: windows-1252 |
| 22 PASS ASCII superset encoding: windows-1253 |
| 23 PASS ASCII superset encoding: windows-1254 |
| 24 PASS ASCII superset encoding: windows-1255 |
| 25 PASS ASCII superset encoding: windows-1256 |
| 26 PASS ASCII superset encoding: windows-1257 |
| 27 PASS ASCII superset encoding: windows-1258 |
| 28 PASS ASCII superset encoding: x-mac-cyrillic |
| 29 PASS ASCII superset encoding: gbk |
| 30 PASS ASCII superset encoding: gb18030 |
| 31 PASS ASCII superset encoding: hz-gb-2312 |
| 32 PASS ASCII superset encoding: big5 |
| 33 PASS ASCII superset encoding: euc-jp |
| 34 FAIL ASCII superset encoding: iso-2022-jp assert_equals: expected "\0\x01\x02\x0
3\x04\x05\x06\x07\b\t\n\v\f\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1
a\x1c\x1d\x1e\x1f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\
]^_`abcdefghijklmnopqrstuvwxyz{|}~" but got "\0\x01\x02\x03\x04\x05\x06\x07\b\t
\n\v\f\r��\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1c\x1d\x1e\x1f !\"#$%&'(
)*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvw
xyz{|}~" |
| 35 FAIL ASCII superset encoding: shift_jis assert_equals: expected "\0\x01\x02\x03\
x04\x05\x06\x07\b\t\n\v\f\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\
x1b\x1c\x1d\x1e\x1f !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[
\\]^_`abcdefghijklmnopqrstuvwxyz{|}~" but got "\0\x01\x02\x03\x04\x05\x06\x07\b
\t\n\v\f\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1c\x1b\x1d\x1e\x1f
!\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmn
opqrstuvwxyz{|}~\x1a" |
| 36 PASS ASCII superset encoding: euc-kr |
| 37 PASS ASCII superset encoding: iso-2022-kr |
| 38 PASS ASCII superset encoding: x-user-defined |
| 39 Harness: the test ran to completion. |
2 | 40 |
3 On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
". | |
4 | |
5 | |
6 decoder = new TextDecoder("ibm866") | |
7 FAIL decoder = new TextDecoder("ibm866") threw exception TypeError: Failed to co
nstruct 'TextDecoder': The encoding label provided ('ibm866') is invalid. | |
8 decoder = new TextDecoder("iso-8859-2") | |
9 decoded = decoder.decode(new Uint8Array(bytes)) | |
10 PASS encodeURIComponent(string) is encodeURIComponent(decoded) | |
11 decoder = new TextDecoder("iso-8859-3") | |
12 decoded = decoder.decode(new Uint8Array(bytes)) | |
13 PASS encodeURIComponent(string) is encodeURIComponent(decoded) | |
14 decoder = new TextDecoder("iso-8859-4") | |
15 decoded = decoder.decode(new Uint8Array(bytes)) | |
16 PASS encodeURIComponent(string) is encodeURIComponent(decoded) | |
17 decoder = new TextDecoder("iso-8859-5") | |
18 decoded = decoder.decode(new Uint8Array(bytes)) | |
19 PASS encodeURIComponent(string) is encodeURIComponent(decoded) | |
20 decoder = new TextDecoder("iso-8859-6") | |
21 decoded = decoder.decode(new Uint8Array(bytes)) | |
22 PASS encodeURIComponent(string) is encodeURIComponent(decoded) | |
23 decoder = new TextDecoder("iso-8859-7") | |
24 decoded = decoder.decode(new Uint8Array(bytes)) | |
25 PASS encodeURIComponent(string) is encodeURIComponent(decoded) | |
26 decoder = new TextDecoder("iso-8859-8") | |
27 decoded = decoder.decode(new Uint8Array(bytes)) | |
28 PASS encodeURIComponent(string) is encodeURIComponent(decoded) | |
29 decoder = new TextDecoder("iso-8859-8-i") | |
30 decoded = decoder.decode(new Uint8Array(bytes)) | |
31 PASS encodeURIComponent(string) is encodeURIComponent(decoded) | |
32 decoder = new TextDecoder("iso-8859-10") | |
33 decoded = decoder.decode(new Uint8Array(bytes)) | |
34 PASS encodeURIComponent(string) is encodeURIComponent(decoded) | |
35 decoder = new TextDecoder("iso-8859-13") | |
36 decoded = decoder.decode(new Uint8Array(bytes)) | |
37 PASS encodeURIComponent(string) is encodeURIComponent(decoded) | |
38 decoder = new TextDecoder("iso-8859-14") | |
39 decoded = decoder.decode(new Uint8Array(bytes)) | |
40 PASS encodeURIComponent(string) is encodeURIComponent(decoded) | |
41 decoder = new TextDecoder("iso-8859-15") | |
42 decoded = decoder.decode(new Uint8Array(bytes)) | |
43 PASS encodeURIComponent(string) is encodeURIComponent(decoded) | |
44 decoder = new TextDecoder("iso-8859-16") | |
45 decoded = decoder.decode(new Uint8Array(bytes)) | |
46 PASS encodeURIComponent(string) is encodeURIComponent(decoded) | |
47 decoder = new TextDecoder("koi8-r") | |
48 decoded = decoder.decode(new Uint8Array(bytes)) | |
49 PASS encodeURIComponent(string) is encodeURIComponent(decoded) | |
50 decoder = new TextDecoder("koi8-u") | |
51 decoded = decoder.decode(new Uint8Array(bytes)) | |
52 PASS encodeURIComponent(string) is encodeURIComponent(decoded) | |
53 decoder = new TextDecoder("macintosh") | |
54 decoded = decoder.decode(new Uint8Array(bytes)) | |
55 PASS encodeURIComponent(string) is encodeURIComponent(decoded) | |
56 decoder = new TextDecoder("windows-874") | |
57 decoded = decoder.decode(new Uint8Array(bytes)) | |
58 PASS encodeURIComponent(string) is encodeURIComponent(decoded) | |
59 decoder = new TextDecoder("windows-1250") | |
60 decoded = decoder.decode(new Uint8Array(bytes)) | |
61 PASS encodeURIComponent(string) is encodeURIComponent(decoded) | |
62 decoder = new TextDecoder("windows-1251") | |
63 decoded = decoder.decode(new Uint8Array(bytes)) | |
64 PASS encodeURIComponent(string) is encodeURIComponent(decoded) | |
65 decoder = new TextDecoder("windows-1252") | |
66 decoded = decoder.decode(new Uint8Array(bytes)) | |
67 PASS encodeURIComponent(string) is encodeURIComponent(decoded) | |
68 decoder = new TextDecoder("windows-1253") | |
69 decoded = decoder.decode(new Uint8Array(bytes)) | |
70 PASS encodeURIComponent(string) is encodeURIComponent(decoded) | |
71 decoder = new TextDecoder("windows-1254") | |
72 decoded = decoder.decode(new Uint8Array(bytes)) | |
73 PASS encodeURIComponent(string) is encodeURIComponent(decoded) | |
74 decoder = new TextDecoder("windows-1255") | |
75 decoded = decoder.decode(new Uint8Array(bytes)) | |
76 PASS encodeURIComponent(string) is encodeURIComponent(decoded) | |
77 decoder = new TextDecoder("windows-1256") | |
78 decoded = decoder.decode(new Uint8Array(bytes)) | |
79 PASS encodeURIComponent(string) is encodeURIComponent(decoded) | |
80 decoder = new TextDecoder("windows-1257") | |
81 decoded = decoder.decode(new Uint8Array(bytes)) | |
82 PASS encodeURIComponent(string) is encodeURIComponent(decoded) | |
83 decoder = new TextDecoder("windows-1258") | |
84 decoded = decoder.decode(new Uint8Array(bytes)) | |
85 PASS encodeURIComponent(string) is encodeURIComponent(decoded) | |
86 decoder = new TextDecoder("x-mac-cyrillic") | |
87 decoded = decoder.decode(new Uint8Array(bytes)) | |
88 PASS encodeURIComponent(string) is encodeURIComponent(decoded) | |
89 decoder = new TextDecoder("gbk") | |
90 decoded = decoder.decode(new Uint8Array(bytes)) | |
91 PASS encodeURIComponent(string) is encodeURIComponent(decoded) | |
92 decoder = new TextDecoder("gb18030") | |
93 decoded = decoder.decode(new Uint8Array(bytes)) | |
94 PASS encodeURIComponent(string) is encodeURIComponent(decoded) | |
95 decoder = new TextDecoder("hz-gb-2312") | |
96 decoded = decoder.decode(new Uint8Array(bytes)) | |
97 PASS encodeURIComponent(string) is encodeURIComponent(decoded) | |
98 decoder = new TextDecoder("big5") | |
99 decoded = decoder.decode(new Uint8Array(bytes)) | |
100 PASS encodeURIComponent(string) is encodeURIComponent(decoded) | |
101 decoder = new TextDecoder("euc-jp") | |
102 decoded = decoder.decode(new Uint8Array(bytes)) | |
103 PASS encodeURIComponent(string) is encodeURIComponent(decoded) | |
104 decoder = new TextDecoder("iso-2022-jp") | |
105 decoded = decoder.decode(new Uint8Array(bytes)) | |
106 FAIL encodeURIComponent(string) should be %00%01%02%03%04%05%06%07%08%09%0A%0B%0
C%0D%EF%BF%BD%EF%BF%BD%10%11%12%13%14%15%16%17%18%19%1A%1C%1D%1E%1F%20!%22%23%24
%25%26'()*%2B%2C-.%2F0123456789%3A%3B%3C%3D%3E%3F%40ABCDEFGHIJKLMNOPQRSTUVWXYZ%5
B%5C%5D%5E_%60abcdefghijklmnopqrstuvwxyz%7B%7C%7D~%7F. Was %00%01%02%03%04%05%06
%07%08%09%0A%0B%0C%0D%0E%0F%10%11%12%13%14%15%16%17%18%19%1A%1C%1D%1E%1F%20!%22%
23%24%25%26'()*%2B%2C-.%2F0123456789%3A%3B%3C%3D%3E%3F%40ABCDEFGHIJKLMNOPQRSTUVW
XYZ%5B%5C%5D%5E_%60abcdefghijklmnopqrstuvwxyz%7B%7C%7D~%7F. | |
107 decoder = new TextDecoder("shift_jis") | |
108 decoded = decoder.decode(new Uint8Array(bytes)) | |
109 FAIL encodeURIComponent(string) should be %00%01%02%03%04%05%06%07%08%09%0A%0B%0
C%0D%0E%0F%10%11%12%13%14%15%16%17%18%19%1C%1B%7F%1D%1E%1F%20!%22%23%24%25%26'()
*%2B%2C-.%2F0123456789%3A%3B%3C%3D%3E%3F%40ABCDEFGHIJKLMNOPQRSTUVWXYZ%5B%5C%5D%5
E_%60abcdefghijklmnopqrstuvwxyz%7B%7C%7D~%1A. Was %00%01%02%03%04%05%06%07%08%09
%0A%0B%0C%0D%0E%0F%10%11%12%13%14%15%16%17%18%19%1A%1B%1C%1D%1E%1F%20!%22%23%24%
25%26'()*%2B%2C-.%2F0123456789%3A%3B%3C%3D%3E%3F%40ABCDEFGHIJKLMNOPQRSTUVWXYZ%5B
%5C%5D%5E_%60abcdefghijklmnopqrstuvwxyz%7B%7C%7D~%7F. | |
110 decoder = new TextDecoder("euc-kr") | |
111 decoded = decoder.decode(new Uint8Array(bytes)) | |
112 PASS encodeURIComponent(string) is encodeURIComponent(decoded) | |
113 decoder = new TextDecoder("iso-2022-kr") | |
114 decoded = decoder.decode(new Uint8Array(bytes)) | |
115 PASS encodeURIComponent(string) is encodeURIComponent(decoded) | |
116 decoder = new TextDecoder("x-user-defined") | |
117 decoded = decoder.decode(new Uint8Array(bytes)) | |
118 PASS encodeURIComponent(string) is encodeURIComponent(decoded) | |
119 PASS successfullyParsed is true | |
120 | |
121 TEST COMPLETE | |
122 | |
OLD | NEW |