copy html from clipboard problem with encoding :(

P

phervers

I'm writing a simple app and i need to access data from clipboard. Data
is in html format and in iso-8859-2 encoding. When i access the data as
text everything is fine, but when i try to access it as html, special
characters are encoded in a weird way. Is this UTF-8 encoding and if so
how do i decode only those characters ? Here is the code i use :

if(Clipboard.GetDataObject().GetDataPresent(DataFormats.Html) )
{
html =
Clipboard.GetDataObject().GetData(DataFormats.Html).ToString();
}
 

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