emacs-bidi
[Top][All Lists]
Advanced

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

Re: [emacs-bidi] reordering based on implicit levels


From: Alex Schroeder
Subject: Re: [emacs-bidi] reordering based on implicit levels
Date: Mon, 12 Nov 2001 02:14:23 +0100
User-agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.1 (i686-pc-linux-gnu)

"Eli Zaretskii" <address@hidden> writes:

> Again, if this is a left-to-right paragraph, the result of converting
> "I SAW A f14 FLYING BY." from visual to logical should be this:
> 
>   A WAS I f14 YB GNIYLF.

This actually seems to work with the current implementation!  My
assumption of what the correct result ought to be seems to be wrong.

  (bidi-reorder-string
   "I SAW A f14 FLYING BY."
   (bidi-resolve-implicit-levels
    (bidi-resolve-weak-types
     (bidi-get-types "I SAW A f14 FLYING BY."))))

 => "A WAS I f14 YB GNIYLF."


>> "he said \"I AM GOING TO london TODAY\"."
> 
> And the result of converting this should be
> 
>    he said "OT GNIOG MA I london YADOT."

This seems to be working as expected as well.

  (bidi-reorder-string
   "he said \"I AM GOING TO london TODAY\"."
   (bidi-resolve-implicit-levels
    (bidi-resolve-weak-types
     (bidi-get-types "he said \"I AM GOING TO london TODAY\"."))))

  => "he said \"OT GNIOG MA I london YADOT\"."


> Note that I assumed that bidi-reorder-string performs visual to
> logical conversion, not the other way around.

Now I am completely confused.  It seems that I can apply my code
(which essential does logical to visual according to UAX#9 without
taking explicit directional types into account) to visual order text
and get the correct logical representation.  I'm not sure wether that
result is entirely expected.  :)

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



reply via email to

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