1<html> 2<head> 3<script> 4<meta charset=koi8-r> 5</script> 6<meta charset=windows-1255> 7</head> 8<body> 9<pre id="log"></pre> 10<script> 11function log(message) 12{ 13 document.getElementById("log").innerText += message + "\n"; 14} 15 16if (window.layoutTestController) 17 layoutTestController.dumpAsText(); 18 19if (document.inputEncoding == "windows-1255") 20 log("PASS: " + document.inputEncoding); 21else 22 log("FAIL: " + document.inputEncoding); 23</script> 24<p>This test passes if the charset is parsed from the meta tag outside the script. 25</body> 26</html> 27