winefile: UNICODE

Martin Fuchs fuchs.martin at gmail.com
Sun Jul 3 06:31:06 CDT 2005


> > I can't find a replacement for wcsrchr() in the windows API, so I have to include my own implementation in the source. There is also no equivalent of towupper(), so I have to change the pattern matching function a bit.
> 
> wcsrchr() is problematic, but can probalby be done with CharPrevW() loops.

I thought it would be enough just to use "--ptr" to go back one
character in UCS-16 strings. Only MBCS or UTF-8 encoded strings would
need such helper functions like CharPrevW()?

> 
> CharUpperW() is towupper().

Well, CharUpper() works with strings instead of characters. So that's
what I changed in the pattern matching function.

But the biggest problem I forgot about before is wsprintf(). Wine's
wsprintf() implementation only handles 64 bit integer formats ("%Ld",
"%Lx") when using msvcrt. So I will have to use LoadLibrary() and
GetProcAddress() to call vswprintf() for this string formats.

Regards,

    Martin




More information about the wine-devel mailing list