HTTP vs UTF-16LE BOM

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

Click here

Assertion: A character encoding set in the HTTP header has lower precedence than the UTF-16LE 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 in the linked page contains a div with a class name that contains the following sequence of bytes: 0xC3 0xBD 0xC3 0xA4 0xC3 0xA8. These represent different sequences of characters in ISO 8859-15, ISO 8859-1 and UTF-8. The external, UTF-8-encoded stylesheet contains a selector .test div.ýäè. This matches the sequence of bytes above when they are interpreted as UTF-8. If the class name matches the selector then the box will turn green.

If the test is unsuccessful, 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
HTML5

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