开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜