?为什么不能取得网页原代码中的汉字?
StringBuilder strb = new StringBuilder("");
try
{
WebRequest wq = WebRequest.Create("http://www.ccbfu.com");
WebResponse wp = wq.GetResponse();
//我试了Encoding的所有字符都不行!奇怪!
StreamReader sr = new StreamReader(wp.GetResponseStream(), Encoding.UTF7);
string str = "";
while((str = sr.ReadLine()) != null)
{
strb.Append(str + "\r\n");
}
sr.Close();
}
catch(WebException we)
{
MessageBox.Show(we.Message);
}
期待答复!共同进步!