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: Tue, 16 Oct 2001 18:18:19 +0200

> Date: Tue, 16 Oct 2001 18:23:45 +0330 (IRT)
> From: Roozbeh Pournader <address@hidden>
> 
> On Tue, 16 Oct 2001, Eli Zaretskii wrote:
> 
> > In the short and not very clearly written section of UTR#9 where it
> > gives recommendations for when the codes are not removed, it says
> > this:
> > 
> >   * In rule X9, instead of removing the format codes, assign the embedding 
> >     level to each embedding character, and turn it into BN. 
> >   * In rule X10, assign L or R to the last of a sequence of adjacent BNs 
> >     according to the eor / sor, and set the level to the higher of the
> >     two levels.
> > 
> > Now, what in the world do they mean by that??  Does anyone have a clue
> > and can explain this in small words?
> 
> Just adding to Behdad's notes, it is not promised that this produces the
> same results as the other method in the algorithm. This section is just
> informative, and has not been tested by any implementor outside
> Unicode.Org.

Sure, it's quite clear from the text that this is just a lip service,
not something that someone imlpemented.  But I still would like to
understand what does this say.  One thing I don't understand is this
part:

   ``instead of removing the format codes, assign the embedding 
     level to each embedding character''

What is ``the embedding level'' which I should assign to those codes?

And also this one:

   ``In rule X10, assign L or R to the last of a sequence of adjacent BNs 
     according to the eor / sor, and set the level to the higher of the
     two levels.''

Do you even understand what are they trying to tell here?  What does
``according to the eor / sor'' mean in practical terms?  What ``two
levels'' do they mean in the last part of this sentence?

> I won't recommend implementing something based on this section.

Actually, what I wrote is based on that section, and it seems to work
fairly well.  Most of what they say there is not very important
anyway, since the algorithm mostly works on each level run separately,
and formatting codes almost always (with the exception of LRM and RLM)
change the level, i.e. end the current level run and start another.

> A good way should be something like FriBidi has implemented.

Unfortunately, I cannot follow the FriBidi lead in a sequential
implementation.  See my other mail.



reply via email to

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