blank spaces before @charset


If a @charset declaration does not start at the beginning of the first line of the file (when there is no BOM), the encoding declaration will not be recognised.

This test is only valid if the user agent recognises the @charset rule.

The HTML page is served as UTF-8. The CSS stylesheet contains a selector that only matches the class name in the HTML if it is read as ISO 8859-15. There is an @charset rule at the start of the style sheet that can set the encoding to ISO 8859-15, but it is incorrectly formed, and so should be ignored. If the previously mentioned selector matches, ie. the @charset rule has not been ignored, the test fails.

Text as read from the style sheet:   (if blank, the style sheet hasn't been read at all)

Next test

Result summary & related tests
Detailed results for this test
Link to spec