[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Clipboard issue

From: Alexander Klenin <klenin_at_gmail.com>
Date: 2007-10-17 15:31:17 CEST

On 10/17/07, <pershin@prosoftsystems.ru> wrote:
> Everytime you put non-unicode CF_TEXT into CB you should act like this:
>
> SetClipboardData(CF_TEXT,hClipboardData);
> LCID *lcid = static_cast<LCID*>(GlobalAlloc(GMEM_DDESHARE,
> sizeof(LCID)));
> *lcid = GetUserDefaultLCID();
> SetClipboardData(CF_LOCALE, static_cast<HANDLE>(lcid));
> CloseClipboard();
>
> Otherwise locale-specific characters may be lost (depends upon keyboard
> switcher state).

This is excellent tip, thanks.
I will definitely use it in my dual-language projects. ;-)
However, TortoiseSVN is multi-language -- what if copied text is not
in user's default locale?

-- 
Alexander S. Klenin
Insight Experts Ltd.
Received on Wed Oct 17 15:31:29 2007

This is an archived mail posted to the TortoiseSVN Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.