emacs-bidi
[Top][All Lists]
Advanced

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

Re: [emacs-bidi] Callbacks?


From: Gregg Reynolds
Subject: Re: [emacs-bidi] Callbacks?
Date: Tue, 29 Nov 2005 04:32:27 -0600
User-agent: Mozilla Thunderbird 1.0.2 (Windows/20050317)

Martin Duerst wrote:
Hello Greg,

At 01:59 05/11/29, Gregg Reynolds wrote:
 >Martin Duerst wrote:
 >...
 >> At the last Internationalization and Unicode Conference,
 >> I presented a paper that looked at the problems of displaying
 >> (X)HTML or XML with bidi text.
 >> (http://www.sw.it.aoyama.ac.jp/2005/pub/IUC28-bidi/IUC28.html,
 >> see also http://www.sw.it.aoyama.ac.jp/2005/pub/IUC28-bidi/
 >> for more pointers)
 >>
 >
>An implementation technique I'd like to see is to simply use background color to indicate which weakly-directional characters in a bidi string have been reordered by the algorithm.

This seems like an useful idea to start with. But how exactly would
you define "weakly-directional characters that have been reordered"?
At first sight, reordering is not a property of individual characters.

But we know that weakly-directional characters can be interpreted either way, depending on context, so they represent ambiguity. The bidi algorithm has to decide how to treat them, no? E.g. with something like

 'he said "OLLEH!" to the world'

can we conclude that the implementation decided ! should be treated as an LTR char following an RTL string? If so, then we have four categories (4 background hues? ;): strong LTR, strong RTL, weak interpreted as LTR, weak interpreted as RTL.

I suppose that once we get unicode support I'll mess around with character and display properties to see what can be done in this area.

[For the first stage of our work, we also did a lot of coloring,
down to the individual character.]

 >That way if I see e.g. " with the "reordered-background-color" I
 >can either do the rearrangement in my head

Great if that works for you. But I don't think that would work

I'm not even sure it would in all cases. I've seen some very wierd reordering involving XML with mixed English and Arabic; I don't think I could ever figure out why it ended up that way, and if I try to fix it up - well, IMHO the bidi algorithm does great violence to the Principle of Least Surprise. My solution in that case is very simple: use a transparent (RTL-enabled, non-reordering) editor. Vim works great; use RTL mode for the Arabic text, and LTR mode for the English. It's quite efficient for XML editing, in fact. (Hence my ardent desire for an option to turn off bidi reordering in Emacs.)

for a large number of people, and we are trying to do better
than that.

I'll have to read your paper more carefully. Seems to me that, once one decides to use the bidi algorithm one has no choice but to suffer the consequences.

-gregg




reply via email to

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