These tests check whether a user agent follows the CSS 2.1 specification when dealing with character encodings for CSS style sheets.

Note that the snapshot summaries of these test results are for released versions of the browsers tested. Versions that are still in development may provide better support for these features. The tests themselves do not test any vendor prefixes.

A number of tests could not be fully checked because there was no font on the system to support one or more of the glyphs in the test. These tests were skipped.

To see the test, click on the link in the left-most column. To see detailed results for a single test, click on the link in the right-most column. To submit test data for a single test, click on the link in the right-most column and then follow the link on that page.

The tables show the latest results from the W3C Test Framework. Below the tables are summaries of the results at a given date. The table data may be more up-to-date than the summary. The tables may also contain some incorrectly scored tests, and tests that relate to non-released versions of browsers. These are not included in the summary.

Snapshot summary, 2011-02-07

All user agents supported encoding declarations using HTTP, @charset, and a charset attribute on a link. In the absence of any other encoding information, all browsers use a UTF-8 signature at the start of a style sheet to indicate that the style sheet is encoded in UTF-8.

All browsers respect the rule that a CSS file with no encoding declaration assumes the encoding of the HTML file that called it. (This was not the case in earlier versions of Opera, Safari and Chrome.)

These tests are only valid if the @charset rule is recognized by the user agent. The result of that test (css-encoding-005) is shown in the 'Basic tests' table.

Snapshot summary, 2011-02-07

Only Firefox and IE reacted as expected to all the typos tested for the @charset declaration. Safari and Chrome, and especially Opera, ignored several typos, rather than failing to recognize the encoding.

These tests are only valid if the relevant HTTP declarations, BOM, @charset rules and charset links have been shown to have an effect. The results for those tests are shown in the 'Basic tests' table, above.

Snapshot summary, 2011-02-07

In terms of precedence between HTTP, BOM, @charset, and a link with a charset attribute, all browsers behaved as expected, except that Safari and Chrome gave higher precedence to a UTF-8 BOM than to an HTTP encoding declaration.

If a file has a UTF-8 signature but has an @charset declaration that indicates that the content of the file is not encoded in UTF-8, the style sheet is ignored, as expected, in Firefox only.