http vs. @charset

 

An HTTP encoding declaration for a stylesheet takes precedence over an @charset declaration.

This test is only valid if the user agent recognises the HTTP and @charset declarations.

The HTML page is served as ISO 8859-1 and has a class name ýäè. This only matches the sequence of bytes in the selector of the CSS file if the selector is read as ISO 8859-1. The CSS style sheet contains an @charset rule that says the file is UTF-8, but the HTTP header says ISO 8859-1. If the HTTP header overrides the @charset rule, the selector will match the class name and the test will pass.

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

Next test
HTML5

css21-style-sheet-rep-016
Result summary & related tests
Detailed results for this test
Link to spec