OLD | NEW |
1 <html> | 1 <html> |
2 <head> | 2 <head> |
3 <script src="../../resources/js-test.js"></script> | 3 <script src="../../resources/js-test.js"></script> |
4 <script src="resources/char-encoding-utils.js"></script> | 4 <script src="resources/char-encoding-utils.js"></script> |
5 </head> | 5 </head> |
6 <body> | 6 <body> |
7 <form id="form" method="GET" target="subframe"><input type="text" id="text" name
="text"></form> | 7 <form id="form" method="GET" target="subframe"><input type="text" id="text" name
="text"></form> |
8 <iframe id="subframe" name="subframe"></iframe> | 8 <iframe id="subframe" name="subframe"></iframe> |
9 <script> | 9 <script> |
10 | 10 |
(...skipping 16 matching lines...) Expand all Loading... |
27 //Yen symbol in gbk | 27 //Yen symbol in gbk |
28 testEncode('GBK', 'U+00A5', '%A3%A4'); | 28 testEncode('GBK', 'U+00A5', '%A3%A4'); |
29 testEncode('gb2312', 'U+00A5', '%A3%A4'); | 29 testEncode('gb2312', 'U+00A5', '%A3%A4'); |
30 testEncode('GB_2312-80', 'U+00A5', '%A3%A4'); | 30 testEncode('GB_2312-80', 'U+00A5', '%A3%A4'); |
31 testEncode('EUC-CN', 'U+00A5', '%A3%A4'); | 31 testEncode('EUC-CN', 'U+00A5', '%A3%A4'); |
32 //Euro symbol in gbk | 32 //Euro symbol in gbk |
33 testEncode('GBK', 'U+20AC', '%80'); | 33 testEncode('GBK', 'U+20AC', '%80'); |
34 testEncode('gb2312', 'U+20AC', '%80'); | 34 testEncode('gb2312', 'U+20AC', '%80'); |
35 testEncode('GB_2312-80', 'U+20AC', '%80'); | 35 testEncode('GB_2312-80', 'U+20AC', '%80'); |
36 testEncode('EUC-CN', 'U+20AC', '%80'); | 36 testEncode('EUC-CN', 'U+20AC', '%80'); |
37 //Misc symbols from TEC specific GBK translation | 37 //Align GBK with gb18030 |
| 38 // See https://www.w3.org/Bugs/Public/show_bug.cgi?id=28740#c3 |
38 testEncode('GBK', 'U+01F9', '%A8%BF'); | 39 testEncode('GBK', 'U+01F9', '%A8%BF'); |
39 testEncode('GBK', 'U+1E3F', '%A8%BC'); | 40 testEncode('GBK', 'U+1E3F', '%A8%BC'); |
40 testEncode('GBK', 'U+22EF', '%A1%AD'); | 41 testEncode('gb18030', 'U+01F9', '%A8%BF'); |
41 testEncode('GBK', 'U+301C', '%A1%AB'); | 42 testEncode('gb18030', 'U+1E3F', '%A8%BC'); |
| 43 testEncode('GBK', 'U+2026', '%A1%AD'); |
| 44 testEncode('GBK', 'U+FF5E', '%A1%AB'); |
| 45 testEncode('gb18030', 'U+2026', '%A1%AD'); |
| 46 testEncode('gb18030', 'U+FF5E', '%A1%AB'); |
| 47 // GBK does not cover these two characters. |
| 48 testEncode('GBK', 'U+22EF', '%26%238943%3B'); |
| 49 testEncode('GBK', 'U+301C', '%26%2312316%3B'); |
42 | 50 |
43 // Replacement encodings - should encode as UTF-8 | 51 // Replacement encodings - should encode as UTF-8 |
44 testEncode("csiso2022kr", "U+00A0", "%C2%A0"); | 52 testEncode("csiso2022kr", "U+00A0", "%C2%A0"); |
45 testEncode("hz-gb-2312", "U+00A0", "%C2%A0"); | 53 testEncode("hz-gb-2312", "U+00A0", "%C2%A0"); |
46 testEncode("iso-2022-cn", "U+00A0", "%C2%A0"); | 54 testEncode("iso-2022-cn", "U+00A0", "%C2%A0"); |
47 testEncode("iso-2022-cn-ext", "U+00A0", "%C2%A0"); | 55 testEncode("iso-2022-cn-ext", "U+00A0", "%C2%A0"); |
48 testEncode("iso-2022-kr", "U+00A0", "%C2%A0"); | 56 testEncode("iso-2022-kr", "U+00A0", "%C2%A0"); |
49 | 57 |
50 // Turning on this test causes a download to occur. FIXME: A bug? | 58 // Turning on this test causes a download to occur. FIXME: A bug? |
51 // testEncode('UTF-8', 'U+221A', '%E2%88%9A'); | 59 // testEncode('UTF-8', 'U+221A', '%E2%88%9A'); |
52 | 60 |
53 if (window.testRunner) | 61 if (window.testRunner) |
54 testRunner.waitUntilDone(); | 62 testRunner.waitUntilDone(); |
55 runTest(); | 63 runTest(); |
56 | 64 |
57 </script> | 65 </script> |
58 </body> | 66 </body> |
59 </html> | 67 </html> |
OLD | NEW |