Michaelwagner wrote:

I would suggest slightly different logic.

Separate the test for determining text direction, and make it something
that the user interface can influence (plug-in, default, not sure).
I'm sure Avi would prefer the default went the other way, because
probably more of his collection is in Hebrew.
Actually, not. Most of my collection is in English, but I still have a substantial Hebrew collection.

But, in general, any heuristic like "guess based on code points" is
doomed to failure, because it is a heuristic. Unless unicode encompases
rendering direction (does it?), you're guessing about languages you
don't know enough about.
I found the following information:
"The UNICODE specification assigns directionality to characters and defines a (complex) algorithm for determining the proper directionality of text."

Wikipedia says that "The Unicode standard also includes a number of related items, such as character properties, text normalization forms, and bidirectional display order (for the correct display of text containing both right-to-left scripts, such as Arabic or Hebrew, and left-to-right scripts)." But I don't think that directionality is part of the property of a character. i.e., not a flag within that can be examined.

I started reading the BIDI algorithm specification and it is a great sleeping pill: http://www.unicode.org/reports/tr9/

So make it something the user can influence (or replace?).

The rest of the code - how it's implemented - can be built-in as Dean
describes. But is rendering direction important? If the characters
paint themselves in the other order, is that important? Provided the
customer can read them properly afterwards, does anyone care? I'm not
sure. It's not a rhetorical question - I really don't know if it
matters.
Are you talking about the scrolling direction? If you are, then yes, it is important. Try to read this sentence from right to left through a small gap and you'll see.

--
Avi Schwartz
http://public.xdi.org/=avi.schwartz

_______________________________________________
Discuss mailing list
[email protected]
http://lists.slimdevices.com/lists/listinfo/discuss

Reply via email to