Unicode question

Ove Kaaven ovehk at ping.uio.no
Fri Dec 6 06:32:09 CST 2002


On Fri, 6 Dec 2002, Rolf Kalbermatter wrote:

> I have finally found most of the string manipulation functions which work
> for Unicode but when it comes down to simple character comparison I'm a
> little bit in the dark here.
> 
> Some code snippets elsewhere in wine make me believe that for the english
> charset WCHAR == char is actually mostly true. However I wonder if this
> can be relied on in code. For instance the Unicode version of ParseField
> would in that case look like this but I really want the opinion of someone
> else on, if the code
> 
> if (*src++ == ',') nField--;
> 
> is actually working as expected on all systems independent of the actually
> used charsets for the local languages.

It should. All the current code in Wine assumes that ASCII is the common
denominator on any system it's built on (a reasonable assumption, pretty
much all charsets used today incorporate ASCII); porting Wine to a
non-ASCII system is going to be next to impossible. Still, the code above
should work in any case as long as the *compiler* respects ASCII (since
ASCII is a subset of Unicode), it doesn't matter what charset the actual
*user* use.




More information about the wine-devel mailing list