Home | History | Annotate | Download | only in encoding
      1 <?xml version="1.0" encoding="UTF-32BE"?>
      2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
      3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
      4 <head></head>
      5 <body>
      6 <p>When dumped into a text file by the test controller, this needs to be viewed as UTF-8:</p>
      7 <p>This is an em dash,  , this is is a delta symbol, ", this is an uppercase pi, ", and this is a lowercase pi, .</p>
      8 <p id="result">Failure: script did not run</p>
      9 <script type="text/javascript">
     10   var result; 
     11   var ans = 'UTF-32BE';
     12   var enc = document.inputEncoding; 
     13   if (enc == ans) {
     14     result = 'Success : ' + enc;
     15   }
     16   else {
     17     result = 'Failure : this should look like ' + ans + ', but it is ' + enc;
     18   }
     19   document.getElementById("result").firstChild.nodeValue = result;
     20   if (window.layoutTestController) layoutTestController.dumpAsText();
     21 </script>
     22 </body>
     23 </html>
     24