<script>
if (window.testRunner)
    testRunner.dumpAsText();

function log(test, name) {
    var a = new TextEncoder().encode(test);
    console.log(name + " encoded length: " + a.length);
    for (var i = 0; i < a.length; ++i)
        console.log("value: " + a[i]);
}

log("\u00EE", "non-ASCII");
log("\uD800A", "invalid surrogate pair")
</script>
