[Fribidi-discuss] resolution of neutral characters

Behdad Esfahbod behdad at bamdad.org
Thu Apr 10 15:31:03 EST 2003


Dear Tomas,

Obviously it is not a bug if FriBidi, as FriBidi is much more 
robust than the Unicode UAX#9!

Humm, first, please take my words that the algorithm can't take 
care of the matching pair.  You know, there may be a single 
closing parenthesis, nesting ones, .... and the algorithm should 
not try to resolve them.  Some simple example:

  This is just a sample text.  Unicode considers U+0028 LEFT 
  PARENTHESIS  ("(") as openning paranthesis and U+0029 RIGHT 
  PARANTHESIS (")") as closing paranthesis.  This is because in 
  right-to-left scripts, they change their direction, so left and 
  right are not proper names.

Well, try to match them in above paragraph.

After that (no matching), the parenthesis in your sample should 
resolve to RTL, another example:

  "NATURAL LOGARITHM (LOG IN BASE e) IS"
                                   ^

This should reorder as this:

  "SI (e ESAB NI GOL) MHTIRAGOL LARUTAN"
      ^

So there's no way to handle both my example, and yours.  And from 
the fact that in your example "log(k)" is a subtext, it should 
take care of its parenthesis it/him/her-self.

behdad

On Thu, 10 Apr 2003, Tomas Frydrych wrote:

> Hi everyone,
> 
> I think I might have found a bug in FriBidi's handling of neutral 
> characters. I am not sure whether this is a bug in FriBidi, or 
> whether this is a problem with the Unicode algorithm, but one way or 
> another the resulting behaviour is unintuitive.
> 
> The following string, where capitals represent RTL characters,
> 
>     "A log(k) B"
> 
> resolves to
> 
>     "B (log(k A"
> 
> I think that the correct visual string should be
> 
>     "B log(k) A"
> 
> Obviously, the closing parenthesis is presently resolved to an RTL 
> character (embeding level 1), while the opening parenthesis is 
> treated as LTR character (level 2). It seems to me that matching 
> pairs of parentheses, braces, etc., should always be resolved to the 
> embeding level of the opening element of the pair.
> 
> Tomas
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: Etnus, makers of TotalView, The debugger 
> for complex code. Debugging C/C++ programs can leave you feeling lost and 
> disoriented. TotalView can help you find your way. Available on major UNIX 
> and Linux platforms. Try it free. www.etnus.com
> _______________________________________________
> Fribidi-discuss mailing list
> Fribidi-discuss at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/fribidi-discuss
> 

-- 
Behdad Esfahbod		22 Farvardin 1382, 2003 Apr 11 
http://behdad.org/	[Finger for Geek Code]

In the corner of the dream was the man with the blue guitar
It had no strings but the music touched the stars





More information about the FriBidi mailing list