Re: Weird bidi behavior?

   Hello, Martin!

It seems to me that it is working as designed.

Case 1 has a default direction equals to LTR, meaning a paragraph 
embedding level equal to 0.  The Arabic words implicitly raise the level 
to 1 at their location.  Simple.

Case 2 starts similarly, i.e at embedding level 0.  The span with 
dir="ltr"  is equivalent to a LRE.  It raises the embedding level to the 
next even number, which is 2 (rule X3 of UAX #9).  The English words 
within the span will receive level 2, and the Arabic word will receive 
level 3 (rule I1).
The Arabic word following the span is at level 1, like in case 1 (rule 
So you have a span at level 2 immediately followed by an Arabic word at 
level 1.  The regular rules (L2) say that the span will be displayed on 
the right side of the Arabic word.

Is that clear?

Shalom (Regards),  Mati
           Bidi Architect
           Globalization Center Of Competency - Bidirectional Scripts
           IBM Israel
           Phone: +972 2 5888802    Fax: +972 2 5870333    Mobile: +972 52 

Martin Duerst <> 
Sent by:
27/08/2008 13:44


Weird bidi behavior?

Can somebody explain the bidi behavior of Case 2 at ?
The only difference between Case 1 and Case 2 is that
Case 2 uses dir='ltr' on the green <span>.

Regards,    Martin.

#-#-#  Martin J. Du"rst, Assoc. Professor, Aoyama Gakuin University

Received on Wednesday, 27 August 2008 22:24:13 UTC