Accesskey n skips to in-page navigation. Skip to the content start.

s_gotoW3cHome Internationalization
 

Test results: HTML escapes

These tests check whether user agents handle character escapes as expected for HTML and XHTML documents. In what follows, 'HTML' means HTML4.01, HTML5 or XHTML 1.0 served as text/html. XML means XHTML 1.0 or XHTML 1.1 served as application/xhtml+xml.

Summary & conclusions

See the results below for user agents tested. This section summarizes the results of those tests.

All user agents produced characters as expected in the basic tests. Safari didn't display the supplementary character's glyph, but copy-paste did produce the right character.

For IE, Opera, and Chrome, it is important to specify a font for the text that includes the character in question if you wish to see the character rather than a box.

All user agents correctly displayed characters that were not in the encoding of the page.

All user agents displayed the euro sign in HTML if the escape used the Windows 1252 code point number rather than the correct Unicode code point number. This is contrary to the results expected as per the HTML 4.01 specification. None did so for pages served as XML.

Latest results

These are results for the latest versions of each user agent tested. A green background (yes) means that the assertion associated with the test held true; red (no) means that it did not; orange (partially) means that it was only partially true. To view the assertion, click on the text in the left column.

Results are given for four types of document format: H4 (HTML 4.01), H5 (HTML5), XH (XHTML 1.0 served as text/html), X (XHTML 1.0 served as XML), X11 (XHTML 1.1, served as XML). If results for all formats are the same, a single cell is shown in the results table for a given test/browser combination. XML tests were not run for IE.

Basic declarations

UA IE IE Firefox Opera Safari Chrome
version 8 7 3.6.3 10.51 4.0.5 4.1.249.1045
OS XP XP XP XP XP XP
date 20100412 20100412 20100412 20100412 20100412 20100412
hex ncr A hexadecimal numeric character reference produces the intended character. yes yes yes yes yes yes
decimal ncr A decimal numeric character reference produces the intended character. yes yes yes yes yes yes
lower-case entity A lower case character entity reference produces the intended character. yes yes yes yes yes yes
upper-case entity An upper case character entity reference produces the intended character. yes yes yes yes yes yes
supplementary character A hexadecimal numeric reference containing the Unicode code point of a supplementary character produces the intended character. yes yes yes yes partially 1 yes

Assertion:  

Link to tests: Escapes

Notes:

  1. Despite the Code2001 font being available on the system, Safari did not display the glyph for the supplementary character, however copying and pasting the blank square that was displayed did produce the right character.

Characters not in the page encoding

UA IE IE Firefox Opera Safari Chrome
version 8 7 3.6.3 10.51 4.0.5 4.1.249.1045
OS XP XP XP XP XP XP
date 20100412 20100412 20100412 20100412 20100412 20100412
hex ncr outside range of charset An hexadecimal numeric reference containing the Unicode code point of a character which is not supported by the current character encoding still produces the intended character. yes yes yes yes yes yes
decimal ncr outside range of charset A decimal numeric reference containing the Unicode code point of a character which is not supported by the current character encoding still produces the intended character. yes yes yes yes yes yes
character entity outside range of charset A character entity reference for a Unicode code point which is not supported by the current character encoding still produces the intended character. yes yes yes yes yes yes

Assertion:  

Link to tests: Escapes

C1 area code points

UA IE IE Firefox Opera Safari Chrome
version 8 7 3.6.3 10.51 4.0.5 4.1.249.1045
OS XP XP XP XP XP XP
date 20100412 20100412 20100412 20100412 20100412 20100412
format H4, H5, XH H4, H5, XH H4 H5 XH X X11 H4 H5 XH X X11 H4 H5 XH X X11 H4 H5 XH X X11
hex ncr for C1 position of euro sign A hexadecimal numeric reference containing the code point for the euro in the Windows 1252 code page should not produce a euro sign. no no no no no yes yes no no no yes yes no no no yes yes no no no yes yes
decimal ncr for C1 position of euro sign A decimal numeric reference containing the code point for the euro in the Windows 1252 code page should not produce a euro sign. no no no no no yes yes no no no yes yes no no no yes yes no no no yes yes

Assertion:  

Link to tests: Escapes

Tell us what you think (English).

Subscribe to an RSS feed.

New resources

Home page news

Twitter (Home page news)

@webi18n

Further reading

Author: Richard Ishida, W3C.

Valid XHTML 1.0!
Valid CSS!
Encoded in UTF-8!

Content first published 2009-04-16. Last substantive update 2010-04-12 17:15 GMT. This version 2010-04-12 17:15 GMT

For the history of document changes, search for results-html-escapes in the i18n blog.