Re: [bidi] Bidi demo

From: Mark Davis (mark@macchiato.com)
Date: Thu Apr 30 2009 - 13:31:15 CDT

  • Next message: Kenneth Whistler: "Re: Unified Canadian Aboriginal Syllabics"

    Mark

    On Thu, Apr 30, 2009 at 09:13, Matitiahu Allouche <matial@il.ibm.com> wrote:

    >
    > The demo is certainly improved. I still have a few peeves.
    >
    > 1) As long as the info in "bidi info" (
    > http://cldr.unicode.org/unicode-utilities/bidi ) stays short, I would
    > rather have it on the demo page itself than as a link.

    I can understand your reasoning, but just for practical reasons (far easier
    to edit), I'll probably leave it where it is.

    >
    >
    > 2) When putting a Tab char (0009) within the input field (which I have been
    > able to do only by copying/pasting from another application)

    I've thought of putting buttons in that would insert some hard-to-type
    characters, like TAB, RLM, etc.

    > and pressing "Show Bidi", the link created on the representation of the Tab
    > in the Source Character line leads to a page with 0 code points.

    Good catch. The characters are being escaped, as:

    http://unicode.org/cldr/utility/list-unicodeset.jsp?a=%09

    but apparently even that doesn't make it through... Have to look at it to
    see what is going on. In the meantime, I just changed it to a tool-tip.

    >
    > 3) I suggest to put the "Show Bidi" button on the right of the check and
    > list boxes, since the user should first choose the settings for ASCII Hack
    > and para direction, and only then press the button (and your UI goes LTR,
    > does it not? :-)

    Good point. This was simple, so I went ahead and did it.

    >
    >
    >
    > 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 <mark@macchiato.com>*
    > Sent by: mark.edward.davis@gmail.com
    >
    > 30/04/2009 03:30
    > To
    > Matitiahu Allouche/Israel/IBM@IBMIL cc
    > "bidi@unicode.org" <bidi@unicode.org>, Unicode <unicode@unicode.org>
    > Subject
    > Re: [bidi] Bidi demo
    >
    >
    >
    >
    > I made some of those fixes, so let me know if there are further problems.
    >
    > The ASCII mapping I am using has the normal BIDI class values, with the
    > following overrides.
    >
    > asciiHackMap.put(']', LRE);
    > asciiHackMap.put('[', RLE);
    > asciiHackMap.put('}', LRO);
    > asciiHackMap.put('{', RLO);
    > asciiHackMap.put('|', PDF);
    > asciiHackMap.putAll(new UnicodeSet("[A-M]"), R);
    > asciiHackMap.putAll(new UnicodeSet("[N-Z]"), AL);
    > asciiHackMap.putAll(new UnicodeSet("[5-9]"), AN);
    > asciiHackMap.put('>', L);
    > asciiHackMap.put('<',R);
    > asciiHackMap.put('"',NSM);
    > asciiHackMap.put('_',BN);
    >
    > I have not tried reconciling those with Asmus's values, which appear to be:
    > int TypesFromChar[] =
    > {
    > //0 1 2 3 4 5 6 7 8 9 a b c d e f
    >
    > ON, ON, ON, ON, L, R, ON, ON, ON, ON, ON, ON, ON, B, RLO,RLE, /*00-0f*/
    > LRO,LRE,PDF,WS, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, ON, /*10-1f*/
    >
    > WS, ON, ON, ON, ET, ON, ON, ON, ON, ON, ON, ET, CS, ON, ES, ES, /*20-2f*/
    >
    > EN, EN, EN, EN, EN, EN, AN, AN, AN, AN, CS, ON, ON, ON, ON, ON, /*30-3f*/
    > R, AL, AL, AL, AL, AL, AL, R, R, R, R, R, R, R, R, R, /*40-4f*/
    > R, R, R, R, R, R, R, R, R, R, R, ON, B, ON, ON, ON, /*50-5f*/
    >
    > NSM, L, L, L, L, L, L, L, L, L, L, L, L, L, L, L, /*60-6f*/
    > L, L, L, L, L, L, L, L, L, L, L, ON, S, ON, ON, ON, /*70-7f*/
    > };
    > *http://www.unicode.org/reports/tr9/BidiReferenceCpp/bidi.c.txt*>
    >
    > Mark
    >
    >
    > *Mark Davis <**
    mark@macchiato.com* <mark@macchiato.com>*>*
    > Sent by: *bidi-bounce@unicode.org* <bidi-bounce@unicode.org>
    >
    > 28/04/2009 03:29
    >
    > To
    > "*bidi@unicode.org* <bidi@unicode.org>" <*bidi@unicode.org*<bidi@unicode.org>
    > > cc
    > Unicode <*unicode@unicode.org* <unicode@unicode.org>> Subject
    > [bidi] Bidi demo
    >
    >
    >
    >
    >
    >
    > I posted a bidi demo at *http://unicode.org/cldr/utility/bidi.jsp*>
    >
    > 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 : Thu Apr 30 2009 - 13:34:19 CDT