1 <html> 2 <head> 3 <link rel="stylesheet" href="../js/resources/js-test-style.css"> 4 <script src="../js/resources/js-test-pre.js"></script> 5 <script src="../js/resources/js-test-post-function.js"></script> 6 <script src="resources/char-encoding-utils.js"></script> 7 </head> 8 <body> 9 <p id="description"></p> 10 <div id="console"></div> 11 <form id="form" method="GET" target="subframe"><input type="text" id="text" name="text"></form> 12 <iframe id="subframe" name="subframe"></iframe> 13 <script> 14 15 16 var charsets = new Array; 17 var unicodes = new Array; 18 var expectedResults = new Array; 19 20 var results = new Object; 21 22 var i = 0; 23 24 testEncode("UTF-8", "U+00A0", "%C2%A0"); 25 //Yen symbol in gbk 26 testEncode('GBK', 'U+00A5', '%A3%A4'); 27 testEncode('gb2312', 'U+00A5', '%A3%A4'); 28 testEncode('GB_2312-80', 'U+00A5', '%A3%A4'); 29 testEncode('EUC-CN', 'U+00A5', '%A3%A4'); 30 //Euro symbol in gbk 31 testEncode('GBK', 'U+20AC', '%80'); 32 testEncode('gb2312', 'U+20AC', '%80'); 33 testEncode('GB_2312-80', 'U+20AC', '%80'); 34 testEncode('EUC-CN', 'U+20AC', '%80'); 35 //Misc symbols from TEC specific GBK translation 36 testEncode('GBK', 'U+01F9', '%A8%BF'); 37 testEncode('GBK', 'U+1E3F', '%A8%BC'); 38 testEncode('GBK', 'U+22EF', '%A1%AD'); 39 testEncode('GBK', 'U+301C', '%A1%AB'); 40 41 // Turning on this test causes a download to occur. FIXME: A bug? 42 // testEncode('UTF-8', 'U+221A', '%E2%88%9A'); 43 44 if (window.layoutTestController) 45 layoutTestController.waitUntilDone(); 46 runTest(); 47 48 successfullyParsed = true; 49 50 </script> 51 </body> 52 </html> 53