[Fribidi-discuss] Re: BiDi WINE status and fribidi
Behdad Esfahbod
behdad at bamdad.org
Sun Aug 25 00:56:02 EST 2002
On Sun, 25 Aug 2002, Shachar Shemesh wrote:
> Not looking at the source yet, I may be talking utter bullshit here.
>
> What I think will be the proper thing to do is to change two locations:
> 1. When classifying the characters, do the surrogate unification, lookup
> the combined code point, and then mark both parts of the surrogate as
> the same type.
> 2. When reordering, if the level is odd (right to left), and the char is
> a surrogate, don't change the order of the pair.
>
> As far as I can see, these are the only changes required in order to
> support UTF-16. They can be relatively trivially extended to support UTF-8.
>
> If anyone who has actually had a look at the code has anything to
> correct me, please do.
>
> Shachar
You are simplifying things too much. The two easy steps are what
you told. But there are some harder ones two:
* Rule W5: States that if there is just *one* char of
type .... Then you should be aware that a surrogate pair is
just one character, not two.
* Rule L3: NSMs in RTL levels should be reordered to
come after their base, now the problem is that both the NSM can
be a surrogate pair, and the base can be a surrogate.
Headache...
So please please don't talk about UTF-8, thats already enough.
Yours,
--
Behdad Esfahbod 3 Shahrivar 1381, 2002 Aug 25
http://behdad.org/ [Finger for Geek Code]
#define is_persian_leap(y) ((((y)-474)%2820+2820)%2820*31%128<31)
More information about the FriBidi
mailing list