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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problems with Unicode data in Clipboard

Status
Not open for further replies.

passs

Programmer
Dec 29, 2003
170
RU
Hi everybody,

Does someone know how to fix such problem:
I have an app in which there should be a possibility to copy/past unicode data into app and from it.
I have such code:
If EditOperation = enmEditOperation.Paste Then

If Clipboard.GetDataObject().GetDataPresent(DataFormats.UnicodeText) Then

txtBox.SelectedText = Clipboard.GetDataObject().GetData(DataFormats.UnicodeText)
End If
Else
Dim myObj As New DataObject
myObj.SetData(DataFormats.UnicodeText, True, txtBox.SelectedText) 'DataFormats.UnicodeText, txtBox.SelectedText)

Clipboard.SetDataObject(myObj, True)
If EditOperation = enmEditOperation.Cut Then

txtBox.SelectedText = ""
End If
End If

It works pretty fine with inserting data into app, all characters display fine. But if I have some data in this app (textbox) something with ieroglifs, russian/german characters and I copy such string into clipboard and then try to paste it into any program except word (it works fine) I get these rectangles instead of symbols.

Any ideas?

Thanks a lot!
Alex

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top