Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copy to clipboard international characters

Status
Not open for further replies.

mironto

Programmer
May 12, 2001
26
SK
I'd like to copy some text to clipboard with this code:
TClipboard *Clipboard;
Clipboard = new TClipboard;
Clipboard->Open();
Clipboard->Clear();
AnsiString TextToClipboard;
TextToClipboard = "blablalba"; //here goes text to copy
Clipboard->AsText = TextToClipboard;
Clipboard->Close();
delete Clipboard;

works fine, but the problem is it does not copy all the characters like "c" (easteuropean characters), I get "è" in the clipboard instead.

I made a workaround through RichEdit:
RichEdit1->Lines->Add(TextToClipboard);
RichEdit1->SelectAll();
RichEdit1->CopyToClipboard();

but this is a bit ugly und untidy solution, can anyone help me to make it without RichEdit?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top