40 lines
1.4 KiB
HTML
40 lines
1.4 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=koi8-r">
|
|
</head>
|
|
<body>
|
|
<script>
|
|
|
|
if (window.testRunner)
|
|
testRunner.dumpAsText();
|
|
|
|
document.write("<p>Initial</p>");
|
|
document.write("<p> document.charset: " + document.charset + "</p>");
|
|
document.write("<p> document.characterSet: " + document.characterSet + "</p>");
|
|
document.write("<p> document.inputEncoding: " + document.inputEncoding + "</p>");
|
|
|
|
document.write("<p>Setting charset to UTF-8 (expected to fail as it is read-only)</p>");
|
|
try {
|
|
document.charset = "utf-8";
|
|
document.write("<p> document.charset: " + document.charset + "</p>");
|
|
document.write("<p> document.characterSet: " + document.characterSet + "</p>");
|
|
document.write("<p> document.inputEncoding: " + document.inputEncoding + "</p>");
|
|
} catch (ex) {
|
|
document.write("<p>Failure (expected)</p>");
|
|
}
|
|
|
|
document.write("<p>Setting characterSet to UTF-8 (expected to fail as it is read-only)</p>");
|
|
try {
|
|
document.characterSet = "utf-8";
|
|
document.write("<p> document.charset: " + document.charset + "</p>");
|
|
document.write("<p> document.characterSet: " + document.characterSet + "</p>");
|
|
document.write("<p> document.inputEncoding: " + document.inputEncoding + "</p>");
|
|
} catch (ex) {
|
|
document.write("<p>Failure (expected)</p>");
|
|
}
|
|
|
|
</script>
|
|
</body>
|
|
<html>
|