Skip to content

Commit

Permalink
Encoding: make it clear sniffing for UTF-8 is not acceptable
Browse files Browse the repository at this point in the history
See whatwg/encoding#68 for background.
  • Loading branch information
annevk committed Dec 12, 2018
1 parent bdd6d95 commit 305ff11
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions encoding/sniffing.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<!doctype html>
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<title>No (UTF-8) sniffing allowed</title>
<div id=log></div>
<div id=content>€€ Hello World! €€</div>
<script>
test(() => {
assert_equals(document.getElementById("content").textContent, "\u00C2\u20AC\u00C2\u20AC Hello World! \u00C2\u20AC\u00C2\u20AC");
assert_equals(document.characterSet, "windows-1252");
});
</script>

0 comments on commit 305ff11

Please sign in to comment.