Summarized test results:
Character encoding (XHTML5)

Intended audience: users, XHTML/HTML coders (using editors or scripting), script developers (PHP, JSP, etc.), CSS coders, Web project managers, and anyone who wants to know how selectors work in current browsers.

Updated

These tests check whether user agents recognise character encoding declarations for XHTML5 documents in the precedence order defined by the specification. These tests pages have XML syntax and are served as application/text+xhtml.

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.

results

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.

Basics

Assertion Gecko Presto Trident WebKit Detailed results

Snapshot summary, 2011-12-17

All user agents detected character encodings declared in the HTTP header.

All user agents use a UTF-8 BOM to set the page encoding in the absence of any other encoding information. Likewise for little- and big-endian UTF-16 BOMs.

In the absence of other character encoding declarations, all browsers used the XML declaration to detect the character encoding for XML documents.

Neither the meta Content-Type element nor the HTML5 charset meta element were used by any browsers to set the encoding in the absence of other encoding declarations. This was expected.

If a charset attribute was added to an a element that pointed to an XHTML file with no other encoding information, only Opera rendered the target page with the specified encoding.

Precedence

Assertion Gecko Presto Trident WebKit Detailed results

Tests were not run on versions of Internet Explorer below IE9, since those versions don't support XML documents.

Snapshot summary, 2012-03-31

An HTTP character encoding declaration is stronger than a byte-order mark in Firefox and Opera, but not in IE or Chrome/Safari.

For all browsers, an HTTP declaration is stronger than that of the XML declaration.

The byte-order mark trumps the XML declaration for Firefox, Opera, Chrome and Safari. The situation for IE needs a little more exploration.

None of the tests featuring either the meta Content-Type or the HTML5 meta charset declaration are significant, since the previous table on this page shows that those declarations are not recognised by browsers in XHTML5 (see tests 8 and 11 above).