页面
http://q.blog.sina.com.cn/search_result.php?searchtype=9&sort=0&searchtext=%BC%F5%B7%CA其中:%BC%F5%B7%CA对应的是减肥,如何把减肥转换为:%BC%F5%B7%CA谢谢
http://q.blog.sina.com.cn/search_result.php?searchtype=9&sort=0&searchtext=%BC%F5%B7%CA其中:%BC%F5%B7%CA对应的是减肥,如何把减肥转换为:%BC%F5%B7%CA谢谢
就HttpUtility.UrlDecode("%BC%F5%B7%CA ");
string str=System.Web.HttpUtility.UrlDecode("%BC%F5%B7%CA", Encoding.GetEncoding("GB2312"));
str= System.Web.HttpUtility.UrlEncode("减肥", Encoding.GetEncoding("GB2312"));
string str=System.Web.HttpUtility.UrlDecode("%BC%F5%B7%CA", Encoding.GetEncoding(936));
str= System.Web.HttpUtility.UrlEncode("减肥", Encoding.GetEncoding(936));这样的用法更精确,936就是gb2312的CodePage