簡體   English   中英

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

[英]iso-8859-1 string to Unicode string

我用此行代碼獲取HTML頁面源代碼

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

頁代碼包是iso-8859-1

但是在html源代碼中存在如下所示的unicode字符串

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

如何在C#中將此代碼轉換為Unicode字符串?

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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM