Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to convert UTF-8 to text in HTML entity?

I have a downloader program that download pages from internet . the encoding of each page is different , some are in UTF-8 and some are Unicode. For example : a that shows 'a' character ; pages full of this characters .We should convert this encodings to normal text .

I used the UnicodeEncoding class in c# , but they do not help me .

How can i decode this encodings to real characters? Is there a class or method that converting this ?

Thanks .

like image 957
Mahdi Amrollahi Avatar asked Dec 18 '22 00:12

Mahdi Amrollahi


1 Answers

That is html-encoded; try HtmlDecode? (you'll need a reference to System.Web.dll)

like image 183
Marc Gravell Avatar answered Dec 24 '22 00:12

Marc Gravell