This document may contain examples in another language or script.
Use accesskey "n" to jump to the internal navigation links at any point. Right now you can do one of the following:
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).
The test pages are:
white-space: normal is applied to the body element.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.
As will be seen from the results below, major browsers, such as Internet Explorer and Firefox, do behave in this way when there is only a linebreak between runs of ideographic text.
Given the observed behaviour mentioned in the last paragraph, and the recommendation of the white-space processing model to remove white space around a linebreak, it is reasonable to assume that any consecutive white space at the end or beginning of a two lines of ideographic text will be removed.
We also assume that ideographic characters are detected, and that all ideographic characters are treated in the same way as those chosen for this test.
Windows-based user agents were tested on Windows XP.
The results for both test pages were identical (ie. with or without the CSS white-space: normal), so there is only one set of
result tables shown.
For each test on each user agent, Y indicates that the result was the same as that expected. Otherwise any deviation from the expected result is described.
| Test | Spaces in ideographic run | Linebreak in ideographic run | Multiple spaces at end of line | Multiple spaces at beginning of line | Multiple spaces at beginning and end of line | Multiple linebreaks embedded in ideographic text, with additional spaces between linebreaks |
|---|---|---|---|---|---|---|
| Expected behaviour | single line, one space after 行 | single line, no spaces after 行 | single line, no spaces after 行 | single line, no spaces after 行 | single line, no spaces after 行 | single line, no spaces after 行 |
| IE 6.0 | Y | Y | one space after 行 | one space after 行 | one space after 行 | one space after 行 |
| Firefox 1.0PR | Y | Y | one space after 行 | one space after 行 | one space after 行 | one space after 行 |
| Mozilla 1.7.2 | Y | Y | one space after 行 | one space after 行 | one space after 行 | one space after 行 |
| Navigator 7.1 | Y | Y | one space after 行 | one space after 行 | one space after 行 | one space after 行 |
| Opera 7.54 | Y | one space after 行 | one space after 行 | one space after 行 | one space after 行 | one space after 行 |
| Test | Full-width punctuation at end of line | Non full-width punctuation at end of line | Full-width digits at end of line | Non full-width digits at end of line |
|---|---|---|---|---|
| Expected behaviour | single line, no spaces after the comma | single line, one space after the comma | single line, no spaces after last digit | single line, one space after last digit |
| IE 6.0 | Y | Y | Y | Y |
| Firefox 1.0PR | Y | Y | Y | Y |
| Mozilla 1.7.2 | Y | Y | Y | Y |
| Navigator 7.1 | Y | Y | Y | Y |
| Opera 7.54 | one space after 行 | Y | one space after 行 | Y |
| Test | Consecutive space between Latin text and spaces between Latin and ideographic | Linebreak (and no spaces) between Latin text embedded in ideographic | Space before Latin text at end of previous line, and a space after Latin text |
|---|---|---|---|
| Expected behaviour | 3 spaces: one before 'Latin', one before 'text' and one after 'text' | single line, a space between 'Latin' and 'text' | single line, one space before and after 'Latin' |
| IE 6.0 | Y | Y | Y |
| Firefox 1.0PR | Y | Y | Y |
| Mozilla 1.7.2 | Y | Y | Y |
| Navigator 7.1 | Y | Y | Y |
| Opera 7.54 | Y | Y | Y |
Opera doesn't appear to apply different behaviour to ideographic text and text in a script that uses spaces between words.
Internet Explorer and the Gecko-based browsers perform as expected except where there are spaces alongside linebreaks, in which case a space is introduced into the run of ideographic 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.
In most of the user agents tested, it is possible to use explicit linebreaks within a block of text and still get appropriate results, but not with Opera. If you want your text to look right in Opera, you need to author in an environment that soft wraps your text, and add no explicit linebreaks within a block.
I18N Test Suite: White space 1 http://www.w3.org/International/tests/sec-white-space-1.html
I18N Test Suite: White space 2 http://www.w3.org/International/tests/sec-white-space-2.html
Definitions of white-space processing model in the CSS 2.1 specification http://www.w3.org/TR/CSS21/text.html#q8
Content created 14 October, 2004. Last update 2004-10-14 13:08 GMT
Copyright © 2004 W3C® (MIT, ERCIM, Keio), All Rights Reserved. W3C liability, trademark, document use and software licensing rules apply. Your interactions with this site are in accordance with our public and Member privacy statements.