HttpWebRequest rqst = (HttpWebRequest)WebRequest.Create(Url);
HttpWebResponse rsps = (HttpWebResponse)rqst.GetResponse();
Stream sm = rsps.GetResponseStream();
s = new StreamReader(sm, Encoding.GetEncoding("")).ReadToEnd();
return s;
href=ClassList.aspx?classcode=200002&ClassName=鏈嶈?淇℃伅&page=163>最后页 只有classname参数后才出现乱码?请问如何解决?
------解决方案--------------------------------------------------------
- C# code
s = new StreamReader(sm, Encoding.GetEncoding("")).ReadToEnd(); 把以上这段代码改成s = new StreamReader(sm, System.Text.Encoding.Default).ReadToEnd();