emacs-bidi
[Top][All Lists]
Advanced

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

Re: [emacs-bidi] Callbacks?


From: Ehud Karni
Subject: Re: [emacs-bidi] Callbacks?
Date: Tue, 29 Nov 2005 11:45:34 +0200

On Tue, 29 Nov 2005 12:02:45 +0900, Martin Duerst <address@hidden> wrote:
>
> Adding marks, embeddings, or overrides directly to the source is
> the first idea one gets when looking at the weird ways in which
> things such as HTML or XML source get reordered by the bidi
> algorithm. But the problem is that you can't add these things
> to the source, because they
> a) ay end up in places where they make the source illegal
>     (e.g. inside a tag)
> b) may affect not only how the source is displayed, but
>     also how the content is displayed e.g. in a browser.
>     In some cases, the desired change is the same, and then
>     everything is okay, but in other cases, you may mess up
>     the final display when trying to fix the source.

There are known visual strings that can not be stored in logical order
without adding embedded "control" characters or using overriding
external directive. In particular the visual:
    <numbers> <alpha> <numbers>
where the <alpha> is of the opposite direction.
    e.g.  123 HEBREW 456 (in LTR reading direction)
    or    123 latin 456 (in RTL reading direction).

This is the reasoning behind the remark:
  "The BDO element should be used in scenarios where absolute control
   over sequence order is required (e.g., multi-language part numbers).
   The dir attribute is mandatory for this element."
in http://www.w3.org/TR/html401/struct/dirlang.html

>From reading your article, I see that you are aware of these
problems, but I don't understand your solution.

You have to accomplish 2 things:
1. The string should be displayed right in the intended application
   (in you case XML/HTML, but it can other e.g. PDF source, bash
   script). My personal belief is that there is NO universal way
   to do this.
2. When the created file is read (again) for editing, these strings
   should be seen (on screen) EXACTLY as it was when it was entered.
   As you pointed out, this should not be done by embedded controlling
   characters. It can be done by adding a commented part that is
   used by Emacs, but ignored by the intended application.


Ehud.


--
 Ehud Karni           Tel: +972-3-7966-561  /"\
 Mivtach - Simon      Fax: +972-3-7966-667  \ /  ASCII Ribbon Campaign
 Insurance agencies   (USA) voice mail and   X   Against   HTML   Mail
 http://www.mvs.co.il  FAX:  1-815-5509341  / \
 GnuPG: 98EA398D <http://www.keyserver.net/>    Better Safe Than Sorry




reply via email to

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