Re: Bidirectional Algorithm Problems

From: schererm@us.ibm.com
Date: Tue Nov 16 1999 - 13:05:29 EST


hi dave,

i suppose that the example in the report that you are struggling with is
just supposed to show the effect of reordering. you need to tweak your text
so that the levels shown result from it.

about the rlm/lrm characters, they are defined at U+200e & U+200f, see
UnicodeData.txt :
200E;LEFT-TO-RIGHT MARK;Cf;0;L;;;;;N;;;;;
200F;RIGHT-TO-LEFT MARK;Cf;0;R;;;;;N;;;;;

they have, as you can see, explicit L or R directionality but are
invisible. in your algorithm, you do not handle them explicitly - the
directional property from the character database will do the trick
automagically simply by being a strong directional code.
an editor could insert these characters to disambiguate the directionality
of text with weak directional properties - numbers or neutrals.

have a look at the implementation in
http://www10.software.ibm.com/developerworks/opensource/cvs/icu/source/common/

,
in the files that are named like ubidi* and bidi*. (the main algorithm is
in ubidi.c .)

hope this helps,

markus



This archive was generated by hypermail 2.1.2 : Tue Jul 10 2001 - 17:20:56 EDT