iso-8859-1字符串到Unicode字符串

时间:2012-09-15 14:29:49

标签: c# unicode

我使用这行代码

获取html源代码页面
WebClient client = new WebClient();
string sPage = client.DownloadString(url); 

页面代码包是iso-8859-1

但在html源

中存在如下所示的unicode字符串
<span title="&#1590;&#1575;&#1601;&#1607;"

如何在c#中将此代码转换为Unicode字符串?

1 个答案:

答案 0 :(得分:1)

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