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 character encoding detection works in current browsers.
These tests check whether user agents recognise character encoding declarations for HTML5 documents. These test pages have HTML syntax and are served as text/html.
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 Details column and look just above the table. The detailed results show the date(s) the test result was recorded, and the version of the browser tested.
Any dependencies are shown in notes above the table, and notes below the table will usually provide any additional useful information, including an explanation of why a result was marked as 'partially successful'.
Note that 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 do not use any vendor prefixes. Tests that do show support for vendor prefixes are listed in the next section.
Test link | Assertion | Detail |
---|---|---|
HTTP charset the-input-byte-stream-001.html |
The character encoding of a page can be set using the HTTP header charset declaration. | |
UTF-16LE BOM the-input-byte-stream-003.html |
A page with no encoding declarations, but with a UTF-16 little-endian BOM will be recognized as UTF-16. | |
UTF-16BE BOM the-input-byte-stream-004.html |
A page with no encoding declarations, but with a UTF-16 big-endian BOM will be recognized as UTF-16. | |
XML declaration the-input-byte-stream-006.html |
[Exploratory] Setting the encoding in the XML declaration will NOT affect the encoding of a page served as text/html. | |
meta content attribute the-input-byte-stream-007.html |
The character encoding of the page can be set by a meta element with http-equiv and content attributes. | |
meta charset attribute the-input-byte-stream-009.html |
The character encoding of the page can be set by a meta element with charset attribute. | |
No encoding declaration the-input-byte-stream-015.html |
A page with no encoding information in HTTP, BOM, XML declaration or meta element will be treated as UTF-8. |
Links: Section 8.2.2 • Related tests
Test link | Assertion | Detail |
---|---|---|
HTTP vs UTF-8 BOM the-input-byte-stream-034.html |
A character encoding set in the HTTP header has lower precedence than the UTF-8 signature. | |
HTTP vs XML declaration the-input-byte-stream-022.html |
[Exploratory] The HTTP header has a higher precedence than an XML declaration. | |
HTTP vs meta content the-input-byte-stream-016.html |
The HTTP header has a higher precedence than an encoding declaration in a meta content attribute. | |
HTTP vs meta charset the-input-byte-stream-018.html |
The HTTP header has a higher precedence than an encoding declaration in a meta charset attribute. | |
UTF-8 BOM vs meta content the-input-byte-stream-037.html |
A page with a UTF-8 BOM will be recognized as UTF-8 even if the meta content attribute declares a different encoding. | |
UTF-8 BOM vs meta charset the-input-byte-stream-038.html |
A page with a UTF-8 BOM will be recognized as UTF-8 even if the meta charset attribute declares a different encoding. | |
XML declaration vs meta content the-input-byte-stream-024.html |
[Exploratory] The XML declaration has a lower precedence than an encoding declaration in a meta content attribute. | |
XML declaration vs meta charset the-input-byte-stream-026.html |
[Exploratory] The XML declaration has a lower precedence than an encoding declaration in a meta charset attribute. | |
meta content, then meta charset the-input-byte-stream-027.html |
[Exploratory] An encoding declaration in a meta content attribute has a higher precedence than a following encoding declaration in a meta charset attribute. | |
meta charset, then meta content the-input-byte-stream-030.html |
[Exploratory] An encoding declaration in a meta charset attribute has a higher precedence than a following encoding declaration in a meta charset attribute. |
Links: Section 8.2.2.1 • Related tests