Return "& aring;" "& ouml;" to their original form.

c# character-encoding html-agility-pack iso-8859-1

Question

I'm bringing up a website.System.Net.WebClient . Pages are inISO-8859-1 encoding. I can see all of the characters properly if I write it to a file and then open it.

However, if I insert this text into the HTML Agility Pack and subsequently extract the innerText property, I get some unusual letters encoded aså and ö .

How may they be represented normally?

1
1
2/24/2012 9:07:12 AM

Accepted Answer

the HttpUtility.HtmlDecode technique

HttpUtility.HtmlDecode("å"); // Ã¥
5
7/31/2011 8:34:38 PM

Popular Answer

You may contact theHtmlEntity.DeEntitize using a method with a text string as the input.



Related Questions





Related

Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow
Licensed under: CC-BY-SA with attribution
Not affiliated with Stack Overflow