Naderi
Naderi

Reputation: 154

iso-8859-1 string to Unicode string

i get html source of page with this line of code

WebClient client = new WebClient();
string sPage = client.DownloadString(url); 

page code package is iso-8859-1

but exist unicode string like below in html source

<span title="&#1590;&#1575;&#1601;&#1607;"

how can i convert this code to Unicode string in c# ?

Upvotes: 0

Views: 232

Answers (1)

L.B
L.B

Reputation: 116178

 string s = HttpUtility.HtmlDecode(@"<span title=""&#1590;&#1575;&#1601;&#1607;");

Upvotes: 1

Related Questions