HTTP vs UTF-16BE BOM

Click on the link. Test passes if the linked page shows a green square (if it fails, the page will likely display garbage, source code or a red box).

Click here

Assertion: A character encoding set in the HTTP header has lower precedence than the UTF-16BE BOM.

Notes:

The HTTP header attempts to set the character encoding to ISO 8859-15. The page starts with a BOM, but there are no other character encoding declarations.

The test on the target page contains a div with a class name that contains a sequence of bytes that only reads as ÜÀÚ if the character encoding is UTF-16BE. The external, UTF-8-encoded stylesheet contains a selector .test div.ÜÀÚ. This only matches the class name in the html if sequence of bytes in the html page is interpreted as UTF-16BE. If the class name matches the selector then the top box will turn green.

If the test fails, the characters þÿ may appear at the top of the page, and cause the page to display incorrectly. These represent the bytes that make up the BOM when encountered in the ISO 8859-15 encoding.

Next test
XHTML5

character-encoding-xhtml-012
Result summary & related tests
Detailed results for this test