Re: [bidi] Bidi demo

From: Mark Davis (
Date: Tue Apr 28 2009 - 22:40:39 CDT

  • Next message: Mark Davis: "Re: Bidi demo"

    On Tue, Apr 28, 2009 at 06:28, Matitiahu Allouche <> wrote:

    > Hello, Mark!
    > This demo is useful, and quite nicely done. A few remarks.

    Thanks, and thanks for the comments.

    > 1) By default, base level 1 is assumed. A check box (LTR paragraph) allows
    > forcing the base level to 0.
    > The default behavior is not quite conformant to the UBA (rule P2). I
    > suggest to replace the check box by 3 radio buttons for UBA default, forced
    > LTR and forced RTL respectively.

    I agree. I did pretty much throw it together, so I didn't expose all three
    choices, but I can make it either a pull-down or radio buttons.

    > 2) The checkbox for "ASCII Hack" may not be understood by casual Bidi
    > overseekers. The section added at the end of the page when checking the box
    > can easily fall beyond the current screenful so that the user will not even
    > be aware that something has happened.
    > I suggest to add a short explanation close to the checkbox and a reference
    > to the added section.

    Agreed. What I really need to do is supply much more of a description.

    > 3) The characters in your ASCII hacking table are different from those
    > chosen by Asmus Freytag in his Bidi Tool (part of the Unibook application),
    > for no benefit that I can see. I suggest to align your table with Asmus's,
    > if for no other reason than that he was the first, so that we veteran Bidi
    > dabblers are used to it.

    I basically just went with the characters that are in,
    plus adding others so as to cover all the classes. I can definitely change
    those, although if the differ across versions of reference code we'll want
    to fix it. (For others, this is not an intrinsic part of the algorithm, just
    for testing.) Where are the Unibook ones listed?

    > 4) The ASCII Hack characters used for ES, ET and CS should be chosen among
    > characters which really have this classification in the latest versions of
    > Unicode. Putting Plus and Hyphen-Minus signs in the ET class sets us back
    > to Unicode 3.x and might reopen an old quarrel with Microsoft (joking :-).
    > Also, Solidus is really CS and is a bad representative for ES.
    > 5) The 001C-001E characters in the B class are rendered as square blocks in
    > my browser (and probably anybody else's). Since they are not easily
    > generated from a keyboard, I suggest to just remove them.
    > 6) 000C is really WS and is not a good representative for the B class. The
    > other representatives of this class are not printable. I suggest to add
    > names and/or hex codes in a comment column.
    > 7) All the characters in the S class are not good choices, being either not
    > easily generated from the keyboard (000B, 001F) or being intercepted by the
    > browser (0009). I suggest to remove those and add some printable ASCII
    > character.
    > 8) Same thing for the WS class: I suggest to add name and/or hex code in a
    > comment column.
    > 9) Your ASCII Hack table has no representatives for LRM and RLM. I suggest
    > to use @ for LRM and & for RLM.

    I used > and <.

    > 10) The string "abc\nde" (keying Enter between "abc" and "de") causes a
    > server internal error when pressing the "Show Bidi" button.

    Ah, yes, I didn't check for multiple lines; I'll fix that.

    > Shalom (Regards), Mati
    > Bidi Architect
    > Globalization Center Of Competency - Bidirectional Scripts
    > IBM Israel
    > Phone: +972 2 5888802 Fax: +972 2 5870333 Mobile: +972 52
    > 2554160
    > *Mark Davis <>*
    > Sent by:
    > 28/04/2009 03:29
    > To
    > "" <>
    > cc
    > Unicode <> Subject
    > [bidi] Bidi demo
    > I posted a bidi demo at **>
    > For a given sample string, it shows the results of applying the bidi
    > algorithm *and* the rules responsible for each character's resulting
    > level. (The UI isn't polished; I threw it together using off-the-shelf
    > components, and some small modifications to the UBA reference code to
    > capture the rules.) The default sample is chosen to invoke most of the
    > rules. Comments are welcome.
    > Mark

    This archive was generated by hypermail 2.1.5 : Tue Apr 28 2009 - 22:44:09 CDT