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

s_gotoW3cHome Internationalization
 

Test results: White space and ideographic text

This page summarises results for a series of tests that seek to establish how user agents support the display of white space associated with passages of text in an ideographic script. Ideographic text doesn't usually include spaces, although spaces may be introduced at boundaries with Latin text or digits (at least, until the CSS autospace property becomes more widely available).

Expected results

The assumptions we make here about expected behaviour are based on the white-space processing model described in CSS 2.1. This specification is not explicit about the expected detailed behaviour for specific script types, so some assumptions have been borrowed from ongoing work on the CSS3 Text Module, which will specify this more clearly.

The CSS 2.1 spec says that white space should be removed from around linebreaks when the white-space property is set to normal. It then says that a remaining linebreak can be transformed into a space, a zero-width space, or removed, according to UA-specific algorithms. Although it is technically correct to argue that transforming the linebreak into a space in the middle of ideographic text is not counter to the specification, the intent of the removal option is to allow broken lines of ideographic text to be reconstituted as one would expect - ie. with no intervening space.

Summary & conclusions

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

All user agents produced a space where it was expected.

When the white space at the line end was more than just a line break, all user agents produced a space in the text.

IE7 eliminated white space between ideographic text when it was only a line break. Firefox and IE8 did not do so visually, but it was not possible to copy and paste the visual space.

Opera, Safari and Chrome all treated white space for ideographic in the same way as for Latin text.

The implications of this are that authors of Chinese or Japanese text must avoid editing environments that will automatically reformat their text, since leading indentation that uses spaces will introduce unexpected gaps into their text.

Conversely, if you want to have a space between runs of text, you can currently achieve this in all browsers by adding space to the beginning or end of a line.

Using the default style and white-space:normal is exactly the same on all user agents.

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.

Default style sheet

UA IE IE Firefox Opera Safari Safari Chrome
version 8 7 3.0.8 9.64 4 beta iPod Touch 2.2.1 1.0.154.53
OS XP XP XP XP XP XP
date 20090407 20090407 20090407 20090407 20090407 20090407 20090407
inline spaces yes yes yes yes yes yes yes
line break only partially1 yes partially1 no no no no
spaces at end of line no no no no no no no
spaces at beginning of line no no no no no no no
spaces at beginning and end of line no no no no no no no
multiple line breaks no no no no no no no
multiple line breaks and spaces no no no no no no no
full width punctuation at line end partially1 yes partially1 no no no no
proportional punctuation at line end   yes yes yes yes yes yes
full width digits at line end partially1 yes partially1 no no no no
proportional digits at line end   yes yes yes yes yes yes
line break before latin   yes yes yes yes yes yes

Notes:

  1. A space is visible on the UI and you can highlight it, but if you copy and paste the characters, no space is captured.

white-space: normal

UA IE IE Firefox Opera Safari Safari Chrome
version 8 7 3.0.8 9.64 4 beta iPod Touch 2.2.1 1.0.154.53
OS XP XP XP XP XP XP
date 20090407 20090407 20090407 20090407 20090407 20090407 20090407
inline spaces yes yes yes yes yes yes yes
line break only partially1 yes partially1 no no no no
spaces at end of line no no no no no no no
spaces at beginning of line no no no no no no no
spaces at beginning and end of line no no no no no no no
multiple line breaks no no no no no no no
multiple line breaks and spaces no no no no no no no
full width punctuation at line end partially1 yes partially1 no no no no
proportional punctuation at line end   yes yes yes yes yes yes
full width digits at line end partially1 yes partially1 no no no no
proportional digits at line end   yes yes yes yes yes yes
line break before latin   yes yes yes yes yes yes

Notes:

  1. A space is visible on the UI and you can highlight it, but if you copy and paste the characters, no space is captured.

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 2004-10-22. Last substantive update 2009-04-07 18:06 GMT. This version 2009-04-07 18:06 GMT

For the history of document changes, search for results-ideographic-white-space in the i18n blog.