Re: [PATCH] Fix Unicode escape string occurring when calling GetClipboardData(CF_TEXT).
May 3, 2010
3:45 a.m.
Sin-ta Hsiea <ibmibmibm.tw(a)gmail.com> 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.
5805
Age (days ago)
5805
Last active (days ago)
0 comments
1 participants
participants (1)
-
Dmitry Timoshkov