[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: minibidi bug




Behdad Esfahbod wrote:
Quoting fribidi.c:

/* There are a few little points in pushing into and poping from the status
   stack:
   1. when the embedding level is not valid (more than
   FRIBIDI_BIDI_MAX_EXPLICIT_LEVEL=61), you must reject it, and not to push

   2. there's a more confusing point too, when the embedding level is exactly
   FRIBIDI_BIDI_MAX_EXPLICIT_LEVEL-1=60, an LRO or LRE is rejected

The input text having the problem only has 2 explicit marks, so this is not an issue with reaching the maximum embedding levels :)

Quoting miniBidi's readme
the failed test is ( ; <-has type RLE. : <- has type LRE)
- INPUT         THE ;best :ONE and
- OUTPUT        best ENO and EHT
- miniBidi      ENO and best EHT
unfortunately the ';' is resolved at level 3 and replaced by a BN in the
reference C implementation, minibidi removes the ';' after resolving its
level. later on 'best' takes over and increases the level to 4. miniBidi
has no trace of the 3 so it misses a flip.
I currently dont have any solution for this failed test.

I remove the ';' early on after rules X1-X10. the embedding levels should be - THE ;best :ONE and - 11113444..........

while miniBidi resloves them to
- THE ;best :ONE and
- 1111 222..........
OR
- 1111 444..........
As far as I can remember...

So as you can see, applying rule L2 (reversing any contiguous sequence)
with and without the ';' would result in 2 different outputs

any ideas ?


ak.