From eliz at gnu.org Mon Sep 28 10:17:20 2009 From: eliz at gnu.org (Eli Zaretskii) Date: Mon, 28 Sep 2009 19:17:20 +0200 Subject: [FriBidi] Implementation of X6 in the FriBidi library Message-ID: <83ocovq99b.fsf@gnu.org> 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 From behdad at behdad.org Mon Sep 28 12:58:12 2009 From: behdad at behdad.org (Behdad Esfahbod) Date: Mon, 28 Sep 2009 15:58:12 -0400 Subject: [FriBidi] Implementation of X6 in the FriBidi library In-Reply-To: <83ocovq99b.fsf@gnu.org> References: <83ocovq99b.fsf@gnu.org> Message-ID: <4AC11554.8070406@behdad.org> 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 at lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/fribidi > From eliz at gnu.org Mon Sep 28 13:57:16 2009 From: eliz at gnu.org (Eli Zaretskii) Date: Mon, 28 Sep 2009 22:57:16 +0200 Subject: [FriBidi] Implementation of X6 in the FriBidi library In-Reply-To: <4AC11554.8070406@behdad.org> References: <83ocovq99b.fsf@gnu.org> <4AC11554.8070406@behdad.org> Message-ID: <83eipqrdn7.fsf@gnu.org> > Date: Mon, 28 Sep 2009 15:58:12 -0400 > From: Behdad Esfahbod > CC: fribidi at lists.freedesktop.org > > 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.