HTML+CSS Internationalization Tests
Character encodings
This page gathers links related to tests being developed by the Internationalization Core Working Group to assess internationalization support of user agents. These tests are subject to change from time to time.
For each of the sections below, this page links to summaries of the results of related tests (for major browsers), to more detailed results (by test suite) in the W3C Test Framework, and to pages in the framework that allow you to run the tests and record results. The remainder of each section provides direct links to the tests themselves, with information about the test assertion and relevant formats.
HTML basic tests
- HTTP charset (character-encoding-001)
Setting the HTTP header charset declaration will affect the encoding of a page.
HTML4HTML5XHTML1.0html - UTF-16LE BOM (character-encoding-003)
A page with no encoding declarations, but with a UTF-16 little-endian BOM will be recognized as UTF-16.
HTML5 - UTF-16BE BOM (character-encoding-004)
A page with no encoding declarations, but with a UTF-16 big-endian BOM will be recognized as UTF-16.
HTML5 - Exploratory: XML declaration (character-encoding-006)
[Exploratory test] Setting the encoding in the XML declaration will not affect the encoding of a page served as text/html.
HTML4HTML5XHTML1.0html - meta content attribute (character-encoding-007)
Setting the encoding in the meta content attribute will affect the encoding of a page served as text/html.
HTML4HTML5XHTML1.0html - meta charset attribute (character-encoding-009)
Setting the encoding in the meta charset attribute will affect the encoding of an HTML5 page.
HTML5 - Exploratory: charset on an a element (character-encoding-014)
[Exploratory test] A link to a page using the a element with a charset attribute will cause a page with no other encoding information to be rendered using the encoding specified in the charset attribute.
HTML5 - No encoding declaration (character-encoding-015)
A page with no encoding information in HTTP, BOM, XML declaration or meta element will be treated as UTF-8.
HTML5XHTML1.0xmlXHTML1.1 - HTTP vs UTF-8 BOM (character-encoding-034)
A character encoding set in the HTTP header has lower precedence than the UTF-8 signature.
HTML4HTML5XHTML1.0html - HTTP vs UTF-16LE BOM (character-encoding-035)
A character encoding set in the HTTP header has lower precedence than the UTF-16LE BOM.
HTML5 - HTTP vs UTF-16BE BOM (character-encoding-036)
A character encoding set in the HTTP header has lower precedence than the UTF-16BE BOM.
HTML5 - Exploratory: HTTP vs XML declaration (character-encoding-022)
[Exploratory test] The HTTP header has a higher precedence than an XML declaration.
HTML4HTML5XHTML1.0html
HTML precedence
- HTTP vs meta content (character-encoding-016)
The HTTP header has a higher precedence than an encoding declaration in a meta content attribute.
HTML4HTML5XHTML1.0html - HTTP vs meta charset (character-encoding-018)
The HTTP header has a higher precedence than an encoding declaration in a meta charset attribute.
HTML5 - UTF-8 BOM vs meta content (character-encoding-037)
A page with a UTF-8 BOM will be recognized as UTF-8 even if the meta content attribute declares a different encoding.
HTML4HTML5XHTML1.0html - UTF-8 BOM vs meta charset (character-encoding-038)
A page with a UTF-8 BOM will be recognized as UTF-8 even if the meta charset attribute declares a different encoding.
HTML5 - Exploratory: XML declaration vs meta content (character-encoding-024)
[Exploratory test] The XML declaration has a lower precedence than an encoding declaration in a meta content attribute.
HTML4HTML5 - Exploratory: XML declaration vs meta charset (character-encoding-026)
[Exploratory test] The XML declaration has a lower precedence than an encoding declaration in a meta charset attribute.
HTML4HTML5XHTML1.0htmlXHTML1.0xmlXHTML1.1 - meta content, then meta charset (character-encoding-027)
An encoding declaration in a meta content attribute has a higher precedence than a following encoding declaration in a meta charset attribute.
HTML5 - meta charset, then meta content (character-encoding-030)
An encoding declaration in a meta charset attribute has a higher precedence than a following encoding declaration in a meta charset attribute.
HTML5
HTML escapes
- HTTP charset (escapes-001)
Setting the HTTP header charset declaration will affect the encoding of a page.
HTML4HTML5XHTML1.0html - UTF-16LE BOM (escapes-003)
A page with no encoding declarations, but with a UTF-16 little-endian BOM will be recognized as UTF-16.
HTML5 - UTF-16BE BOM (escapes-004)
A page with no encoding declarations, but with a UTF-16 big-endian BOM will be recognized as UTF-16.
HTML5 - Exploratory: XML declaration (escapes-006)
[Exploratory test] Setting the encoding in the XML declaration will not affect the encoding of a page served as text/html.
HTML4HTML5XHTML1.0html - meta content attribute (escapes-007)
Setting the encoding in the meta content attribute will affect the encoding of a page served as text/html.
HTML4HTML5XHTML1.0html - meta charset attribute (escapes-009)
Setting the encoding in the meta charset attribute will affect the encoding of an HTML5 page.
HTML5 - Exploratory: charset on an a element (escapes-014)
[Exploratory test] A link to a page using the a element with a charset attribute will cause a page with no other encoding information to be rendered using the encoding specified in the charset attribute.
HTML5 - No encoding declaration (escapes-015)
A page with no encoding information in HTTP, BOM, XML declaration or meta element will be treated as UTF-8.
HTML5XHTML1.0xmlXHTML1.1 - HTTP vs UTF-8 BOM (escapes-034)
A character encoding set in the HTTP header has lower precedence than the UTF-8 signature.
HTML4HTML5XHTML1.0html - HTTP vs UTF-16LE BOM (escapes-035)
A character encoding set in the HTTP header has lower precedence than the UTF-16LE BOM.
HTML5 - HTTP vs UTF-16BE BOM (escapes-036)
A character encoding set in the HTTP header has lower precedence than the UTF-16BE BOM.
HTML5 - Exploratory: HTTP vs XML declaration (escapes-022)
[Exploratory test] The HTTP header has a higher precedence than an XML declaration.
HTML4HTML5XHTML1.0html - HTTP vs meta content (escapes-016)
The HTTP header has a higher precedence than an encoding declaration in a meta content attribute.
HTML4HTML5XHTML1.0html - HTTP vs meta charset (escapes-018)
The HTTP header has a higher precedence than an encoding declaration in a meta charset attribute.
HTML5 - UTF-8 BOM vs meta content (escapes-037)
A page with a UTF-8 BOM will be recognized as UTF-8 even if the meta content attribute declares a different encoding.
HTML4HTML5XHTML1.0html - UTF-8 BOM vs meta charset (escapes-038)
A page with a UTF-8 BOM will be recognized as UTF-8 even if the meta charset attribute declares a different encoding.
HTML5 - Exploratory: XML declaration vs meta content (escapes-024)
[Exploratory test] The XML declaration has a lower precedence than an encoding declaration in a meta content attribute.
HTML4HTML5 - Exploratory: XML declaration vs meta charset (escapes-026)
[Exploratory test] The XML declaration has a lower precedence than an encoding declaration in a meta charset attribute.
HTML4HTML5XHTML1.0htmlXHTML1.0xmlXHTML1.1 - meta content, then meta charset (escapes-027)
An encoding declaration in a meta content attribute has a higher precedence than a following encoding declaration in a meta charset attribute.
HTML5 - meta charset, then meta content (escapes-030)
An encoding declaration in a meta charset attribute has a higher precedence than a following encoding declaration in a meta charset attribute.
HTML5
CSS basic tests
Results: Summary • W3C Framework ( tbd )
Run tests in W3C Framework: tbd
- HTTP declaration (css-encoding-002)
The user agent respects the encoding of a css stylesheet declared in HTTP.
HTML5 - @charset declaration (lowercase) (css-encoding-005)
The user agent respects the encoding of a css stylesheet declared in a lowercase @charset rule.
HTML5 - @charset declaration (uppercase) (css-encoding-006)
The user agent respects the encoding of a css stylesheet declared in an uppercase @charset rule.
HTML5 - link charset (css-encoding-008)
The user agent respects the encoding of a css stylesheet declared in a charset attribute on the HTML link.
HTML5 - inheritance from HTML encoding (css-encoding-011)
The user agent applies the encoding of the HTML file to a css stylesheet whose encoding is not otherwise declared.
HTML5 - CSS has UTF-signature (css-encoding-015)
The user agent uses a UTF-8 signature without an @charset at the beginning of a css stylesheet to indicate that the encoding is UTF-8.
HTML5
CSS unknown encoding
Results: Summary • W3C Framework ( tbd )
Run tests in W3C Framework: tbd
- css @charset unknown (css-encoding-019)
When a stylesheet has a @charset declaration with an unknown value, the stylesheet should be ignored.
HTML5
CSS @charset typos
Results: Summary • W3C Framework ( tbd )
Run tests in W3C Framework: tbd
- no semicolon at end of charset rule (css-encoding-020)
If a @charset declaration is missing a final semicolon, the encoding declaration will not be recognised.
HTML5 - extra spaces after @charset (css-encoding-021)
If a @charset declaration has more than one space after 'charset', the encoding declaration will not be recognised.
HTML5 - extra spaces before colon in charset rule (css-encoding-022)
If a @charset declaration has spaces just before the colon, the encoding declaration will not be recognised.
HTML5 - linebreak in middle of charset rule (css-encoding-023)
If a @charset declaration has a line break in the middle, the encoding declaration will not be recognised.
HTML5 - single quotes around charset name (css-encoding-024)
If a @charset declaration value has single, rather than double, quotes around it, the encoding declaration will not be recognised.
HTML5 - blank line before @charset (css-encoding-025)
If a @charset declaration is not on the first line of the file, the encoding declaration will not be recognised.
HTML5 - blank spaces before @charset (css-encoding-026)
If a @charset declaration does not start at the beginning of the first line of the file (when there is no BOM), the encoding declaration will not be recognised.
HTML5
CSS precedence
Results: Summary • W3C Framework ( tbd )
Run tests in W3C Framework: tbd
- http vs. @charset (css-encoding-027)
An HTTP encoding declaration for a stylesheet takes precedence over an @charset declaration.
HTML5 - http vs. charset link (css-encoding-028)
An HTTP encoding declaration for a stylesheet takes precedence over a charset attribute link declaration.
HTML5 - http vs. bom (css-encoding-029)
An HTTP encoding declaration for a stylesheet takes precedence over a UTF-8 signature.
HTML5 - @charset vs. link charset (css-encoding-030)
An HTTP encoding declaration for a stylesheet takes precedence over a UTF-8 signature.
HTML5 - css bom and @charset iso15 (css-encoding-018)
When a stylesheet has a BOM and a @charset declaration that is not for a Unicode encoding, the stylesheet fails.
HTML5
Content last changed 2011-11-29 12:02 GMT.