WebClient MyWebClient = new WebClient();后面加一样行
MyWebClient.Encoding = Encoding.Default; // or other encoding type
试试看。即发送请求时,预先制定编码方式。

解决方案 »

  1.   

    Encoding是不是该设置成UTF-8???
      

  2.   

    Byte[] pageData = MyWebClient.DownloadData("http://www.163.com");//从指定网站下载数据
    WebClient编码为UTF-8码,想得到的编码个是要在请求的页面文件上做一限制,如“http://www.163.com“同级的文件夹目录或上一级的Web.Config Web配置文件上加上 <globalization fileEncoding="gb2312" requestEncoding="gb2312" responseEncoding="gb2312"/>才能得到你想要得编码串