Retreiving CF_HTML fromat data from Clipboard

K

Kevin Lee

I've written some code following.

IDataObject o = Clipboard.GetDataObject();
string html = (string) o.GetData(DataFormats.Html);

According to the CF_HTML documentation, the data in the
clipboard was encoded by UTF8, But It returns string
which encoded by system default.
Due to illegal decoding, Some characaters(3-byte char in
Unicode) were lost.
How can I fix this problem? Is it bug in the Framework?

I'm using DBCS WindowsXP like Japanese or Korean.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top