Re: An issue with the Unicode BiDi Algorithm

Richard Ishida wrote:

><p dir="rtl">
>1. xxxxxx xxxx English.<br>
>2. xxx.
></p>
>
>This produces this in Mozilla:
>        English. xxxx xxxxxx .1
>                        .xxx .2
>  
>
(incorrect, the "." should be rtl (because followed by xxx) and then 
come after "English" to the left )

>and this in IE:
>        .English xxxx xxxxxx .1
>                        .xxx .2
>  
>
(correct, So IE, once is not always,  is actually doing the right thing.)

).
Just the opposite of the next example

>Now compare that to:
>
><p dir="rtl">
>1. xxxxxx xxxx English,<br>
>and more xxx.
></p>
>
>In Mozilla you'll see:
>        English, xxxx xxxxxx .1
>                  .xxx and more
>(which is correct)
>
>and in IE you'll see:
>        ,English xxxx xxxxxx .1
>                  .xxx and more
>
>(which is incorrect)
>
>
>  
>
>So Mozilla is actually doing the right thing.
>
<br> has nevertheless a "presentation effect". In some context it 
results in a visual effect that can lead to an "incorrect reading", but 
which is just a natural consequence of BIDI algo.

This code, where x are arabic
<p dir="rtl"> xx ab cd gh &rlm; ef xxx <p>
should give in a normal browser
xxx ef ab cd gh xx


this one
<p dir="rtl"> xx ab cd <BR> gh &rlm; ef xxx <p>
should give
ab cd xx
xxx ef gh

which could be read as "ab cd ef gh"
(another spoofing opportunity :-))

A real example is at
 http://www.w3c.org.ma/Tests/bidi-vs-br.html
extract from
http://www.w3c.org.ma/

(letter Waw as RLM)

Regards, Najib

-- 
Najib TOUNSI (mailto:tounsi@w3.org)
Bureau W3C au Maroc (http://www.w3c.org.ma/)
Ecole Mohammadia d'Ingenieurs, BP 765 Agdal-RABAT Maroc (Morocco)
Phone : +212 (0) 37 68 71 74  Fax : +212 (0) 37 77 88 53
Mobile: +212 (0) 61 22 00 30

Received on Friday, 18 February 2005 10:17:30 UTC