winefile: UNICODE

Marcus Meissner meissner at suse.de
Sun Jul 3 06:38:36 CDT 2005


On Sun, Jul 03, 2005 at 01:31:06PM +0200, Martin Fuchs wrote:
> > > 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()?

Should be, yes. Very likely CharPrevW() is just a TCHAR equivalent of
CharPrevA().
 
> > CharUpperW() is towupper().
> 
> Well, CharUpper() works with strings instead of characters. So that's
> what I changed in the pattern matching function.

No, it also works on characters. Check MSDN. ;)

> 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.

Don't know about that.

Ciao, Marcus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-devel/attachments/20050703/9945d7be/attachment.pgp


More information about the wine-devel mailing list