[Israel.pm] Displaying bidi text in re (e.g. in the editor).

Amit Aronovitch aronovitch at gmail.com
Sat Feb 7 23:09:59 PST 2009


On Fri, Feb 6, 2009 at 5:47 AM, Omer Zak <w1 at zak.co.il
<mailto:w1 at zak.co.il>> wrote:

    On Wed, 2009-02-04 at 11:44 +0200, Amit Aronovitch wrote:
    > We are not talking about the general purpose bidi algorithm, but on a
    > new standard that would provide a "higher-level protocol" for it (as
    > suggested in unicode UAX#9). The main idea is that the application
    (e.g.
    > editor) would do a *syntax dependant* tokenization and run the bidi
    > algorithm separately on each token (maybe the term "token" here is
    > misleading, as  it may refer to long strings e.g. comments).

    I hope I am not too late to contribute to the discussion.


Standartization is a slow process, no rush for now... Would be happy for
any input regarding this (or other possible standartization of bidi
issues) privately, or direct me to appropriate forum.
 


    >From my experience, when editing mixed directionality text, it is
    desirable to display the text segment, which one actually edits, in a
    pure LTR or RTL direction.  Such a text segment would typically be 5-10
    characters long in each side of the cursor.


In normal editing that sounds abit confusing. Interesting suggestion
though, would be happy to discuss this when we get to dealing with
cursor movements etc, but prbly elsewhere, as this is getting OT for the
Perl list.


    For Latin and Hebrew, pure LTR is OK.  For Hebrew with nikkud and
    Arabic, pure RTL is necessary.

    When just presenting text, which is not actually being edited, use the
    bidi algorithm appropriately.  My personal preference in such a
    situation would be to suppress the bidi algorithm altogether when
    editing a Perl or Python script with Hebrew text fragments.


Is it possible that, at least in part, this is because current
implementations of bidi display ignore the syntactical context, so would
cause strange results (e.g. appear to break the syntax) - which are more
confusing than disabling the whole thing altogether?


    I wonder whether Arab speakers can deal with mirror images of Arabic
    glyphs and use pure LTR display when editing scripts with Arabic text
    fragments.


Normally (unless your'e Leo da Vinci of course :-) ), mirror writing is
considerably slower and harder to read (possibly even harder than
"reversed order" text), especially when you know the language well
(young kids might confuse directions). I believe Arabic is no exception
(even to me it is much slower, and I read Arabic very slowly even in the
normal direction...).

  Amit




More information about the Perl mailing list