File: UTF-16BE-BOM.html

package info (click to toggle)
golang-golang-x-net 1%3A0.0%2Bgit20191112.2180aed%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 6,624 kB
  • sloc: makefile: 37; asm: 18
file content (66 lines) | stat: -rw-r--r-- 2,670 bytes parent folder | download | duplicates (22)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<!DOCTYPE html>

<html  lang="en" >

<head>

<title>UTF-16BE BOM</title>

<link rel='author' title='Richard Ishida' href='mailto:ishida@w3.org'>

<link rel='help' href='http://www.w3.org/TR/html5/syntax.html#the-input-byte-stream'>

<script src="http://w3c-test.org/resources/testharness.js"></script>

<script src="http://w3c-test.org/resources/testharnessreport.js"></script>

<meta name='flags' content='http'>

<style type='text/css'>

.test div { width: 50px; }

</style>



<link rel="stylesheet" type="text/css" href="encodingtests-15.css">

</head>

<body>



<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: 0xC3 0xc0 0x53 0xc1 0xC3 0xc0 0xAC 0xc20 0xC3 0xc0 0x61 0xc1. 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.

-->



<script>

test(function () {

	assert_equals(document.getElementById('box').offsetWidth, 100);

	}, 'A page with no encoding declarations, but with a UTF-16 little-endian BOM will be recognized as UTF-16.');

</script>



<div id=log></div>



</body>

</html>