By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
457,732 Members | 841 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 457,732 IT Pros & Developers. It's quick & easy.

Clipboard problem for Latin 2 (Hungarian, Polish)

P: n/a
xyz
I have a menu item to handle clipboard actions (cut, copy, paste).
When I paste text that I copied from a Hungarian web page, the display
looks normal on my RichTextBox, but the text retrieved from the
clipboard is corrupted. For example, a U with double accent ( byte
code x'FB' ) is replaced by a question mark in my txtEdit.Text after a
Paste operation.

It seems that the Clipboard.GetText() is changing the data.
How is it possible to retrieve the correct byte codes from the
clipboard for Latin 2 (CP 8859-2) ?

Thanks,
xyz

==== My clipboard code for VB5:
Private Sub mnuEditItem_Click(Index As Integer)
Select Case Index
Case 0
' If Index = 0, user chose Cut.
Clipboard.Clear
Clipboard.SetText txtEdit.SelText ' Copy selected
text onto the Clipboard.
txtEdit.SelText = "" ' Clear selected
text from the document.
Case 1
' If Index = 1, user chose Copy.
Clipboard.Clear
Clipboard.SetText txtEdit.SelText ' Copy selected
text onto Clipboard.
Case 2
' If Index = 2, user chose Paste.
txtEdit.SelText = Clipboard.GetText(vbCFText) ' Paste
Clipboard text (if any) into document.
cmdTags.Enabled = True 'Enable "Generate tags" button
End Select
End Sub

Jul 17 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.