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: Tue, 20 Nov 2001 01:30:07 +0100
User-agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.1 (i686-pc-linux-gnu)

"Ehud Karni" <address@hidden> writes:

> On Mon, 19 Nov 2001 17:48:50 +0100, Alex Schroeder <address@hidden> wrote:
>> 
>> (bidi-logical-to-visual "MY NUMBER IS: 02-654-3210." 'R2L)
>> ".02-654-3210 :SI REBMUN YM"
>> 
>> Do you think there is a bug when resolving the levels?
>
> I no expert of UNICODE rules, so I checked with fribidi and it's
> the same result there.
>
> Alex, can you check for me (with your code) the following visual
> text:    ABCDE 123 fgh 456 IJKLM

(bidi-visual-to-logical "ABCDE 123 fgh 456 IJKLM" 'R2L)
"MLKJI fgh 456 123 EDCBA"

(bidi-logical-to-visual
 (bidi-visual-to-logical "ABCDE 123 fgh 456 IJKLM" 'R2L) 'R2L)
"ABCDE fgh 456 123 IJKLM"

> AFAIK, this visual string cannot be represented in UTR#9 logical
> without at least 1 formatting character (BTW that is one of the
> cases where my algorithm [in hebeng.el] differs from UNICODE's).

You are right; and we'be talked about this before.  I know that some
of the visual strings cannot be transformed to logical representations
without adding formatting characters.  I didn't want to dispute this.
All I wondered was wether Yair's test string also belonged to that
category.  Yair said it did, and if my code is correct, it doesn't.

However, the solution may be what Behdad Esfahbod said: The reference
implementation uses slightly different bidi types, so that results may
differ from the reference implementation.  Thus, it may be possible
that a certain string needs formatting characters for the logical
representation when the reference implementation is used, and the same
string may need no formatting characters for the logical
representation when another implementation is used.  I didn't check
this, though.

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



reply via email to

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