WinHugs and Unicode

Neil Mitchell ndmitchell at gmail.com
Fri Sep 16 12:51:50 EDT 2005


> > This process should not alter the non unicode code paths at all,
> > beause of various defines in Windows.
> 
> I fear you may be opening a can of worms, and you may end up having to
> change things everywhere.

Shouldn't do. Windows defines A and W versions of all functions, i.e.
SendMessage is a #define, which calls either SendMessageA or
SendMesssageW depending on if #define Unicode or not. LPTSTR is the
best way to define strings which maps to either ASCII LPSTR or Unicode
LPWSTR. Throughout the WinHugs code its a bit of a haphazard mess of
both LPSTR and LPTSTR. In order to get it all synced, you need to use
_T("str") for strings, which autos between unicode and ascii. The
include in this patch enables that.

With this patch, the unicode version will not work. But it does put in
the necessary include so that from now on converting a file can be
done one by one, and its not too hard.

To be honest, I'm not that fussed about Unicode (my language has a
small alphabet), so this patch could be ignored until someone who
cares about it steps up.

Thanks

Neil


More information about the Cvs-hugs mailing list