[Fribidi-discuss] Re: BiDi WINE status and fribidi
Shachar Shemesh
fribidi-discuss at sun.consumer.org.il
Fri Aug 23 02:35:02 EST 2002
I would like to dispell some myths that may or may not be surrounding
the MS Windows implementation. The myth says that it has a single
implementation of anything.
More answers in body of email.
Omer Zak wrote:
>>>There are some Unicode code points, which cannot be represented in 16
>>>bits, but I believe that WINE can live without supporting those code
>>>points (which would otherwise require surrogates in UTF-16).
>>>
>>>
>>>
>>That, I'm afraid, is where you are wrong. These codepages are crucial
>>for far east support, and Wine in general cannot live without them. What
>>I am willing to do is add surrogate support to fribidi, however. This
>>shouldn't pose TOO much of a problem, but it means #ifdefs in the code.
>>
>>
>
>General issue:
>We use flags (in FriBidiEnv) to tailor the FriBidi algorithm to various
>situations. In general, they should be usable in lieu of #ifdef's.
>However, some people may need a lightweight version of FriBidi, omitting
>code which supports certain flag settings.
>Therefore, it may be necessary to accompany each flag with #ifdef around
>code which implements it.
>
>
Thing is, these #ifdefs are only relevant when doing UTF-16 processing.
Under UTF-32, no surrogates are necessary at all. I don't think
compiling fribidi to support UTF-32 and UTF16 SIMULTANIOUSLY is an
option, though :-( Please correct me if I'm wrong.
>Does this mean that MS-Windows does not follow exactly the Unicode
>standard when handling the special directional override character codes?
>
>
This doesn't mean a thing. This merely means that, when calling CERTAIN
functions, you can specifically say that the third character should be
treated as an Hebrew character, regardless of what the Unicode tables say.
As far as my testings show, Windows DOES support the various Unicode
overrides (RLO, RLE, etc.). The problem is that no program will generate
them, and so the question is rather mute. For one thing - they are only
available if you are using Unicode (and almost all programs are ANSI).
Another is that I have seen no interface that allows the Unicode BiDi
algorithm to select the base direction. It is always explicetly either
RTL or LTR, but never depending on the string printed.
The character override, I believe, is rather a mute point, as I can't
see anyone actually using it. It is, however, the deciding factor
against using fribidi in Wine. See the thread at
http://www.winehq.com/hypermail/wine-devel/2002/08/0201.html, and
http://www.winehq.com/hypermail/wine-devel/2002/08/0231.html and the
answer at http://www.winehq.com/hypermail/wine-devel/2002/08/0236.html
in particular.
Shachar
More information about the FriBidi
mailing list