静态化乱码--大家帮忙啊
以前本来好好的,结果换了台服务器就出现乱码了,可能是什么原因?各位大侠帮忙看看,下面是部分代码StreamWriter sw = new StreamWriter(a, false, Encoding.Default);
WebRequest HttpWebRequest = WebRequest.Create("http://www.****.cc/news/" + url);//url之前已经定义
WebResponse HttpWebResponse = HttpWebRequest.GetResponse();
sr = new StreamReader(HttpWebResponse.GetResponseStream(), Encoding.Default);
string strHtml = sr.ReadToEnd();
sw = File.CreateText(Server.MapPath("~/news/" + a));
sw.WriteLine(strHtml);
sw.Close();
Response.WriteFile(Server.MapPath("~/news/" + a));
[[it] 本帖最后由 yunj1105 于 2008-12-2 09:20 编辑 [/it]]