Implementation of X6 in the FriBidi library

View: New views
3 Messages — Rating Filter:   Alert me  

Implementation of X6 in the FriBidi library

by Eli Zaretskii :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

Sorry if this is a FAQ, and please point me at it if it is.

The file fribidi-bidi.c in the FriBidi library has this code:

    for_run_list (pp, main_run_list)
    {
      FriBidiCharType this_type = RL_TYPE (pp);
      if (FRIBIDI_IS_EXPLICIT_OR_BN (this_type))
        {
          ...
        }
      else
        {
          /* X6. For all types besides RLE, LRE, RLO, LRO, and PDF:
             a. Set the level of the current character to the current
             embedding level.
             b. Whenever the directional override status is not neutral,
             reset the current character type to the directional override
             status. */
          RL_LEVEL (pp) = level;
          if (!FRIBIDI_IS_NEUTRAL (override))
            RL_TYPE (pp) = override;
        }

Unless I'm misreading the code, this means that X6 is not applied to
characters whose original type is "WEAK BN".  However, UAX#9 does not
exempt WEAK BN characters from the override, so this looks like being
against the UAX#9 rules.

Am I missing something? are there good reasons for behaving like that?

TIA
_______________________________________________
fribidi mailing list
fribidi@...
http://lists.freedesktop.org/mailman/listinfo/fribidi

Re: Implementation of X6 in the FriBidi library

by Behdad Esfahbod-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Eli,

I'm not sure I understand the issue you are raising completely.  However, I
think it's a non-issue since BN characters are conceptually removed in X9, so
it doesn't matter.  However, there is a change around these rules coming in
the next update to UAX#9 that explicitly supports the code as is, see:

   http://www.unicode.org/reports/tr9/tr9-20.html

Does that address your concern?

behdad

On 09/28/2009 01:17 PM, Eli Zaretskii wrote:

> Hi,
>
> Sorry if this is a FAQ, and please point me at it if it is.
>
> The file fribidi-bidi.c in the FriBidi library has this code:
>
>      for_run_list (pp, main_run_list)
>      {
>        FriBidiCharType this_type = RL_TYPE (pp);
>        if (FRIBIDI_IS_EXPLICIT_OR_BN (this_type))
> {
>  ...
> }
>        else
> {
>  /* X6. For all types besides RLE, LRE, RLO, LRO, and PDF:
>     a. Set the level of the current character to the current
>     embedding level.
>     b. Whenever the directional override status is not neutral,
>     reset the current character type to the directional override
>     status. */
>  RL_LEVEL (pp) = level;
>  if (!FRIBIDI_IS_NEUTRAL (override))
>    RL_TYPE (pp) = override;
> }
>
> Unless I'm misreading the code, this means that X6 is not applied to
> characters whose original type is "WEAK BN".  However, UAX#9 does not
> exempt WEAK BN characters from the override, so this looks like being
> against the UAX#9 rules.
>
> Am I missing something? are there good reasons for behaving like that?
>
> TIA
> _______________________________________________
> fribidi mailing list
> fribidi@...
> http://lists.freedesktop.org/mailman/listinfo/fribidi
>
_______________________________________________
fribidi mailing list
fribidi@...
http://lists.freedesktop.org/mailman/listinfo/fribidi

Re: Implementation of X6 in the FriBidi library

by Eli Zaretskii :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

> Date: Mon, 28 Sep 2009 15:58:12 -0400
> From: Behdad Esfahbod <behdad@...>
> CC: fribidi@...
>
> I'm not sure I understand the issue you are raising completely.  However, I
> think it's a non-issue since BN characters are conceptually removed in X9, so
> it doesn't matter.

It does matter in an implementation that retains the format codes
instead of removing them, according to section 5.2 of UAX#9.

> However, there is a change around these rules coming in
> the next update to UAX#9 that explicitly supports the code as is, see:
>
>    http://www.unicode.org/reports/tr9/tr9-20.html
>
> Does that address your concern?

Yes, thank you.
_______________________________________________
fribidi mailing list
fribidi@...
http://lists.freedesktop.org/mailman/listinfo/fribidi