Sin-ta Hsiea <[email protected]> wrote: > Here's a patch that fetch UTF8 string, and convert to local codepage.
> + count = WideCharToMultiByte(CP_OEMCP, 0, lpwstr, -1, NULL, 0,
> NULL, NULL);
> + hText = GlobalAlloc(GMEM_MOVEABLE | GMEM_DDESHARE, count);
> +
> + if (hText)
> + {
> + CHAR *text = GlobalLock(hText);
> + WideCharToMultiByte(CP_OEMCP, 0, lpwstr, -1, text, -1, NULL,
> NULL);
> + GlobalUnlock(hText);
> + }
CP_OEMCP is not a local codepage.
--
Dmitry.
