This section provides a summary for the tests results for user agents. ‘HTML,’ in what follows, implies to HTML4.01, XHTML 1.0, or HTML5, served as text/html. XML implies to XHTML 1.0, XHTML 1.1, or XHTML5 (served as application/xhtml+xml).
Basic declarations
All user agents have detected the character encoding declared in the header of HTTP for XML and HTML. The user agents use a UTF-8 BOM in setting the page encoding without any other possible encoding information. This also happens for little-endian and big-endian UTF-16 BOMs, although testing has been done only on the HTML5 format. All pages have used the XML declaration, but the HTML documents has also used it for all tested browsers apart from IE. Specifications on the same have not been done for HTML. Notably, this test uses XML declaration as the sole encoding information source.
Meta element of Content-Type was used in setting the HTML encoding, but not XML. The meta element of HTML5 charset was superficially recognized for HTML by all browsers, but not XML. Such syntax is hardly described in the specifications of HTML 4.01, but in the specification of HTML5 and thus documents with the declaration hardly validate. Addition of a charset attribute to an element pointing to a given HTML file without other encoding information results to only Opera rendering the target page through the specified encoding.
Precedence
Generally, the precedence rules that have been described within the HTML5 specification section are altogether followed by all the tested browsers. In this regard, all are trumped by HTTP header; all of them are overridden by BOM in-document declarations; XML declaration is found to win over the XML meta declarations, but it is the opposite for HTML.
A number of differences are known to exist as follow:
- A UTF-8 BOM or UTF-16 overrides the declaration for HTTP in the case of Internet Explorer, Chrome, and Safari browsers.
- The meta charset or meta Content-Type declarations are relatively stronger than the UTF-8 BOM as opposed to UTF-16 BOM in Firefox. Once an HTML5 meta charset declaration and meta Content-Type appear together in an HTML page, it happens that the second is trumped by the first.
Latest results
The latest results are for the newest versions for the tested agent of each user. A background of green (yes) implies to a partially true assertion associated with the held test. Red (no) implies that the assertion was not true, while orange (partially) implies that the assertion was partially true. Mouse over the left column enables viewing of the assertion. The results are in four different document format types including H4 (HTML 4.01), XH (XHTML 1.0 presented as text/html), H5 (HTML5), X5 (XHTML5), X11 (XHTML 1.1, presented as XML), and X (XHTML 1.0 presented as XML). Running the UTF-16 tests is only done in the HTML5 format. In these results, the tests ignore because Internet Explorer does not handle pages that are served as XML.