Convert "& aring;" "& ouml;" to its normal representation
I'm loading a web page System.Net.WebClient
. Page is in ISO-8859-1
encoding.
If I write it to file and then open, I can see all characters normally.
But if I put this content into HtmlAgilityPack and then extract innerText pr开发者_Go百科operty,
I'm getting some special letter encoded as å
and ö
.
How to convert them to normal representation?
Use the HttpUtility.HtmlDecode
method
HttpUtility.HtmlDecode("å"); // å
You can call the HtmlEntity.DeEntitize
method with the text string as the parameter.
精彩评论