Retreiving CF_HTML fromat data from Clipboard

  • Thread starter Thread starter Kevin Lee
  • Start date Start date
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.
 
Back
Top