Skip to content

Commit

Permalink
Encoding: BOM detection
Browse files Browse the repository at this point in the history
  • Loading branch information
Andreu Botella authored Mar 19, 2020
1 parent fc79309 commit 7d9b5a5
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
17 changes: 17 additions & 0 deletions encoding/bom-handling.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<!-- starts with a UTF-8 BOM -->
<!doctype html>
<meta charset="windows-1252">
<script src=/resources/testharness.js></script>
<script src=/resources/testharnessreport.js></script>
<title>BOM handling</title>
<div id=log></div>
<script>

test(
() => {
assert_equals(document.characterSet.toLowerCase(), "utf-8");
},
"document.characterSet should match the BOM"
);

</script>
1 change: 1 addition & 0 deletions encoding/bom-handling.html.headers
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Content-Type: text/html; charset=windows-1252

0 comments on commit 7d9b5a5

Please sign in to comment.