W3C home > Mailing lists > Public > www-international@w3.org > January to March 2011

Using white-space: no-wrap to prevent breaking between CJK words/names

From: Richard Ishida <ishida@w3.org>
Date: Mon, 31 Jan 2011 17:33:24 +0000
Message-ID: <4D46F264.20506@w3.org>
To: www-style@w3.org
CC: www International <www-international@w3.org>, public-i18n-cjk@w3.org
Ambrose Li was concerned to find a way to prevent line breaking between 
characters in certain Japanese and Chinese words, such as names and 
other compound words.

Boris Zbarsky suggested that the correct approach is to use markup 
around the words/names and apply white-space:no-wrap.

I also think that this is probably the right approach. It is similar to 
the approach used in SSML with the token or w element. 
http://www.w3.org/TR/speech-synthesis11/#S3.1.8.2

Ambrose thought that no-wrap doesn't work in most browsers, so I put a 
quick test case together at 
http://www.w3.org/International/tests/test-incubator/nowrap-in-cjk/test1.html

I found that:
Firefox, Opera (Windows) and Camino work fine.
Chrome and Safari both wrap the character on either side of the marked 
up word as a single unit. I think this is a bug.
IE8 wraps the character following the marked up word (but not the one 
before like Chrome and Safari) as a single unit with the marked up word. 
  I think this is also a bug.
Opera on the Mac doesn't seem to support no-wrap at all, and just wraps 
one character at a time.

-- 
Richard Ishida
Internationalization Activity Lead
W3C (World Wide Web Consortium)

http://www.w3.org/International/
http://rishida.net/
Received on Monday, 31 January 2011 17:34:53 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 31 January 2011 17:34:54 GMT