> We are developing some sites that need to be displayed in a right-to-left
> language (such as Hebrew).
>
> Part of the solution is to use the RTL attribute.  Another part is to use
> CSS appropriately.
>
> When we do this to display our pages (still in English), the punctuation
> behaves somewhat oddly.  For example, full-stops appear at the left of the
> right-aligned line.  This makes sense.  What doesn't make sense is that
> other non-alpha characters such as parentheses also get moved to the left of
> the line of text.  This results in things like:
>
>    GDP per capita
>    (Dollars)
>
> becoming:
>
>    GDP per capita
>         ((Dollars
>
> Is there anyone here who has much experience with this sort of thing?  How
> do we solve / work around this issue?

What is being displayed (aka both round-brackets at one end) isn't
specifically a bug in the browsers.  The layout engine is using the
Bidi layout rules.  What it is saying is that:
- the opening round bracket, which is normally on the LHS of the text,
must go on the RHS of the text, due to dir=RTL
- the text then renders LTR as the bidi rules for ascii is LTR.
- the closing round bracket depends on the bidi rules for the previous
character (which was LTR), so it displays LTR too.

The problem itself is that bidi is hard and there are some corner
cases that arn't well defined -> basically, if you want to display LTR
text, on RTL layout, then you will probably find stuff that doesn't
work right  (AFAIK this is sanctioned as undefined behaviour).

Hope this helps,
Mathew Robertson


*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: memberh...@webstandardsgroup.org
*******************************************************************

Reply via email to