emacs-bidi
[Top][All Lists]
Advanced

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

Re: [emacs-bidi] debugging visual-to-logical


From: Alex Schroeder
Subject: Re: [emacs-bidi] debugging visual-to-logical
Date: Mon, 19 Nov 2001 14:52:12 +0100
User-agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.1 (i686-pc-linux-gnu)

"Ehud Karni" <address@hidden> writes:

> There are also problems with digits and punctuation (depends on the 
> specific order). For example try to represent logically the following
> visual text:
>     ABCDE .50$ FGHIJ 
>     ABCDE .50% FGHIJ 
>     ABCDE .$50 FGHIJ       
>     ABCDE .%50 FGHIJ 
>
> Each of the above will be easily represented with formatting LRM.

I went back to this problems to try and see wether bidi.el doesn't in
fact to the right thing.  And it seems that it does.  The only thing
it doesn't do is return a "reasonable" logical representation.  Here's
the first problem as an example:

(bidi-visual-to-logical "ABCDE .50$ FGHIJ" 'R2L)
"JIHGF 50$. EDCBA"

But all of the logical representations are correct in that they can be
transformed back to the correct visual representation.

(bidi-logical-to-visual (bidi-visual-to-logical "ABCDE .50$ FGHIJ" 'R2L) 'R2L)
"ABCDE .50$ FGHIJ"
(bidi-logical-to-visual (bidi-visual-to-logical "ABCDE .50% FGHIJ" 'R2L) 'R2L)
"ABCDE .50% FGHIJ"
(bidi-logical-to-visual (bidi-visual-to-logical "ABCDE .$50 FGHIJ" 'R2L) 'R2L)
"ABCDE .$50 FGHIJ"
(bidi-logical-to-visual (bidi-visual-to-logical "ABCDE .%50 FGHIJ" 'R2L) 'R2L)
"ABCDE .%50 FGHIJ"

(bidi-logical-to-visual (bidi-visual-to-logical "ABCDE .50$ FGHIJ" 'L2R) 'L2R)
"ABCDE .50$ FGHIJ"
(bidi-logical-to-visual (bidi-visual-to-logical "ABCDE .50% FGHIJ" 'L2R) 'L2R)
"ABCDE .50% FGHIJ"
(bidi-logical-to-visual (bidi-visual-to-logical "ABCDE .$50 FGHIJ" 'L2R) 'L2R)
"ABCDE .$50 FGHIJ"
(bidi-logical-to-visual (bidi-visual-to-logical "ABCDE .%50 FGHIJ" 'L2R) 'L2R)
"ABCDE .%50 FGHIJ"

Alex.
-- 
http://www.emacswiki.org/



reply via email to

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