[Israel.pm] Displaying bidi text in re (e.g. in the editor).
w1 at zak.co.il
Thu Feb 5 19:47:05 PST 2009
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.
>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.
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.
I wonder whether Arab speakers can deal with mirror images of Arabic
glyphs and use pure LTR display when editing scripts with Arabic text
Not voting in an election is like voting for the candidate, whom you
hate the most.
My own blog is at http://www.zak.co.il/tddpirate/
My opinions, as expressed in this E-mail message, are mine alone.
They do not represent the official policy of any organization with which
I may be affiliated in any way.
WARNING TO SPAMMERS: at http://www.zak.co.il/spamwarning.html
More information about the Perl