emacs-bidi
[Top][All Lists]
Advanced

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

Re: [emacs-bidi] Embedding levels of formatting codes


From: Eli Zaretskii
Subject: Re: [emacs-bidi] Embedding levels of formatting codes
Date: Sun, 11 Nov 2001 11:00:57 +0200 (IST)

On Wed, 17 Oct 2001, Behdad Esfahbod wrote:

> > >   AN ARABIC {LRE}{PDF} 123-456
> > > 
> > > The correct answer should be this:
> > > 
> > >   456-123  CIBARA NA
> > > 
> > > And for this one:
> > > 
> > >   AN ARABIC {LRE} {PDF} 123-456
> > > 
> > > The correct answer is this:
> > > 
> > >   123-456 CIBARA NA
> > 
> > I don't see the difference between these two test cases.  Why should
> > the single blank between LRE and PDF make any difference here?  Did
> > you perhaps mean LRO instead of LRE?
> 
> No, I exactly mean what I wrote, I designed the case to show you the 
> difference, and tested it with both fribidi and reference 
> implemention, and just added it to fribidi's test cases, lets get into 
> them: (I hope you can parse this :-) ).
> 
> input string:    "AN ARABIC {LRE}{PDF} 123-456"
> runs bidi types:  (AL)(WS)(AL)(WS)(LRE)(PDF)(WS)(EN)(ON)(EN)
> explicit marks resolved,
> embedding levels: 1111111111??????????11111111
> implicit levels resolved,
> embedding levels: 1111111111??????????12221222
> and obviously reordering this, results in: "456-123  CIBARA NA"
> 
> and this one:
> 
> input string:    "AN ARABIC {LRE} {PDF} 123-456"
> runs bidi types:  (AL)(WS)(AL)(WS)(LRE)(WS)(PDF)(WS)(EN)(ON)(EN)
> explicit marks resolved,
> embedding levels: 1111111111?????2?????11111111
> implicit levels resolved,
> embedding levels: 1111111111?????2?????22222222
> and obviously reordering this, results in: " 123-456 CIBARA NA"
> 
> And the point is that if you assign level 2 to {LRE} and {PDF} in this 
> test, then the you will solve the first test wrong.

Okay, thanks for this and other inputs.  I had to redesign the
structure of the code to support this, but I guess the need to do so
was coming my way anyhow.  They say you always have to throw away the
initial design and start from scratch...

It's done now, and the output produced by these two examples works as
you expect.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]