Bidi space Q&A, [was RE: Agenda I18N Core TF telcon, 2003-06-10 at 17:00 UTC, 10am PST, 1pm EST, 18:00UK]

Many thanks for this, Ian.  I have used your information to produce a
new draft of my Q&A.

 http://www.w3.org/International/questions/qa-bidi-space.html

RI

============
Richard Ishida
W3C

tel: +44 1753 480 292
http://www.w3.org/International/
http://www.w3.org/People/Ishida/



> -----Original Message-----
> From: w3c-i18n-ig-request@w3.org 
> [mailto:w3c-i18n-ig-request@w3.org] On Behalf Of Michel Suignard
> Sent: 17 June 2003 22:58
> To: Martin Duerst
> Cc: w3c-i18n-ig@w3.org
> Subject: RE: Agenda I18N Core TF telcon, 2003-06-10 at 17:00 
> UTC, 10am PST, 1pm EST, 18:00UK
> 
> 
> 
> Sorry I couldn't make the call this morning, but I completed my action
> item:
> 
> >Michel: To contact HTML and CSS WG re.
> >         http://www.w3.org/International/questions/qa-bidi-space.html
> >         to ask them:
> >         - Is there something wrong in the spec?
> >         - What is the best solution to recommend
> 
> After contacting the CSS WG, Ian Hickson confirmed that the 
> spec covered
> that case and that the behavior showed within the link above by 'some
> browsers' is indeed correct. And he also gave some suggestion, see
> appended email at the end.
> 
> Michel
> ---From Ian Hickson--
> On Mon, 16 Jun 2003, Michel Suignard wrote:
> >
> > Hi all, during discussion of bidi within the I18n WG we 
> came up with 
> > the test case exposed in the following link:
> >    http://www.w3.org/International/questions/qa-bidi-space.html
> 
> This isn't undefined or an edge case, it is in fact exactly defined,
> both in the CSS2.1 draft:
> 
>    http://www.w3.org/Style/Group/css2-src/text.html#q8
> 
> ...and the CSS3 Text Module:
> 
   http://www.w3.org/TR/css3-text/#white-space-props

The scenario in question was definitely considered when I wrote that
text, there are tests for it:

 
http://www.hixie.ch/tests/adhoc/css/text/white-space/normal/collapsing/b
idi/001.html
 
http://www.hixie.ch/tests/adhoc/css/text/white-space/normal/collapsing/b
idi/002.html

The second shows that there is interoperability here (Mozilla and WinIE
both do this the same once you work around WinIE's unrelated bugs).


> - The spec (CSS3 text) is not crystal clear on what should happen 
> there although it hints at preserving a space on each side of the 
> logical stream which should then render with a space on each side of 
> the '(W3C) string. So I would say that in this case these 'some 
> browsers' (including btw Win IE6) may not be doing the optimal thing.

As far as I can tell, the spec is exactly clear about what should
happen.

In:

   <ltr>A <rtl> B </rtl> C</ltr>

...the spec says that the space after A is kept, the space before B is
removed, the space after B is kept, the space before C is removed. This
is then rendered per UNICODE bidi rules, and the end result is:

   A  BC
   11221 (embedding levels)

...as shown by Mozilla and WinIE.

If authors don't want this, they shouldn't place spaces before end tags,
or should rely on implicit bidi embedding (so that the space after the B
above ends up as an ltr (level 1) character instead of rtl).

-- 
Ian Hickson                                      )\._.,--....,'``.    fL
"meow"                                          /,   _.. \   _\  ;`._ ,.
http://index.hixie.ch/                         `._.-(,_..'--(,_..'`-.;.'

Received on Wednesday, 18 June 2003 08:36:47 UTC