Source code

Revision control

Other Tools

Test Info:

þÿ<!DOCTYPE html>↩
<html lang="en" >↩
<title>UTF-16BE BOM</title>↩
<link rel='author' title='Richard Ishida' href=''>↩
<link rel='help' href=''>↩
<script src="/resources/testharness.js"></script>↩
<script src="/resources/testharnessreport.js"></script>↩
<meta name='flags' content='http'>↩
<style type='text/css'>↩
.test div { width: 50px; }↩
<link rel="stylesheet" type="text/css" href="support/encodingtests-15.css">↩
<div class='test'><div id='box' class='ÃSà ¬Ãa'>&#xA0;</div></div>↩
<!-- Notes: ↩
No encoding information is declared in the HTTP header or inside the document, other than in the BOM. The text of a class name in the test contains the following sequence of bytes: 0x00 0xC3 0x01 0x53 0x00 0xC3 0x20 0xAC 0x00 0xC3 0x01 0x61. The external, UTF-8-encoded stylesheet contains a selector with a sequence of characters that will only match the class name in the HTML if the page is read as UTF-16BE.↩
test(function () {↩
assert_equals(document.getElementById('box').offsetWidth, 100);↩
}, 'A page with no encoding declarations, but with a UTF-16 big-endian BOM will be recognized as UTF-16.');↩
<div id="log"></div>↩