/[suikacvs]/www/test/charset/utf8/bom/utf8-bom-zwnbsp-2.html.cgi
Suika

Contents of /www/test/charset/utf8/bom/utf8-bom-zwnbsp-2.html.cgi

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1 - (hide annotations) (download)
Sun May 18 03:06:23 2008 UTC (16 years, 11 months ago) by wakaba
Branch: MAIN
CVS Tags: HEAD
New; Fx2, Opera9, IE7 pass; Safari3 fails (it strips any U+FEFF everywhere, not only at the beginning)

1 wakaba 1.1 #!/usr/bin/perl
2     use strict;
3    
4     print qq[Content-Type: text/html; charset=utf-8\n\n];
5     print qq[\xEF\xBB\xBF\xEF\xBB\xBF\xEF\xBB\xBFXXXXXX];
6     print q[
7     <p id=result class=FAIL>FAIL (noscript)</p>
8     <script>
9     var r = document.getElementById ('result');
10     r.firstChild.data = 'FAIL (script)';
11     if (document.body.firstChild.data.match (/^\uFEFF\uFEFFXXXXXX/)) {
12     r.firstChild.data = 'PASS';
13     r.className = 'PASS';
14     } else {
15     r.firstChild.data = 'FAIL (first character is U+' + document.body.firstChild.data.charCodeAt (0).toString (16) + ', second character is U+' + document.body.firstChild.data.charCodeAt (1).toString (16) + ')';
16     }
17     </script>
18     ];

admin@suikawiki.org
ViewVC Help
Powered by ViewVC 1.1.24