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

s_gotoW3cHome Internationalization
 

Test results: White space and Thai 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 the Thai script. Thai text doesn't use spaces to separate words, although spaces may be introduced at boundaries with Latin text or digits and spacing is the normal way to separate phrases or sentences (rather than using a full stop or equivalent).

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 Thai text is not counter to the specification, the intent of the removal option is to to allow broken lines of Thai text to be reconstituted as one would expect - ie. with no intervening space, or with a zero-width space.

Summary & conclusions

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

All user agents except Chrome produced a visual space where it was expected.

With the exception of Chrome, all user agents handled Thai in the same way as Latin text.

The implications of this are that authors of Thai 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 most browsers by adding space to the beginning or end of a line (but not Chrome).

Chrome removes visual space in all cases (even where the test assertion wasn't expecting it) except where you have a single line break with spaces after. However, if you copy and paste the text, a space character is always picked up.

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 no no no no no no partially1
spaces at end of line no no no no no no no
spaces at beginning of line no no no no no no partially1
spaces at beginning and end of line no no no no no no no
multiple line breaks no no no no no no partially1
multiple line breaks and spaces no no no no no no partially1
digits at line end yes yes yes yes yes yes partially1
line break before latin yes yes yes yes yes yes partially1

Notes:

  1. No space is visible on the UI, but if you copy and paste the characters, a space is also 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 no no no no no no partially1
spaces at end of line no no no no no no no
spaces at beginning of line no no no no no no partially1
spaces at beginning and end of line no no no no no no no
multiple line breaks no no no no no no partially1
multiple line breaks and spaces no no no no no no partially1
digits at line end yes yes yes yes yes yes partially1
line break before latin yes yes yes yes yes yes partially1

Notes:

  1. No space is visible on the UI, but if you copy and paste the characters, a space is also 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.