你在《HEAD》《/HEAD》中加入<META http-equiv=Content-Type content="text/html; charset=gb2312">看看

解决方案 »

  1.   

    修改 web.config 中的 <globalization>:<configuration>
       <system.web>
          <globalization requestEncoding="GB2312" responseEncoding="GB2312" culture="zh-CN" fileEncoding="GB2312" /> 
       </system.web>
    </configuration>
      

  2.   

    请大家认真一点看看我的问题!!!  大家可以根据我提供的源代码测试一下不就明白。很多东西我都难跟你们说清楚,把
    this .richTextBox1.Text=getPageHtml(para,content,"GB2312","GB2312");改为Response方式打印就看到结果。
      

  3.   

    读出来的页面源码为:那位能帮忙分析以下那里出问题<HTML>                                                 
    <head><meta http-equiv='Content-Type' content='text/html; charset=gb2312'><title></title>
    <link REL='stylesheet' HREF='travelskyNew.css'>
    </head>
    <body bgcolor=white onLoad='start()' onResize=start()>
    <SCRIPT src=/gb/js/head10.js></script><SCRIPT src=/gb/js/floater.js></script><style type="text/css">
    <!--
    p,div {font-size:12px;line-height:16px;font-family:KNLe}
    a:hover {color:red}
    .p1 {font-size:9pt;font-family:KNLe;line-height:12pt}
    .p2 {font-size:11pt;font-family:313316314345;line-height:16pt}
    #p1 {font-size:9pt;font-family:KNLe;line-height:12pt}
    .f1 {font-size:11pt}
    .l1 {line-height:16pt;font-size:11pt}
    .s1{font-size:8pt;font-family:KNLe;color:#F8D307}
    a.t1 {color:white}
    a.t1:hover {color:red}
    #n1 {color:#6666cc}
    #star {color:rgb(250,207,2);font-family:KNLe;font-size:12pt}
    a{color:#2E5E8C;}
    a:link        {text-decoration: none; color: #blue;}
    a:hover {color:rgb(210,4,4)}
    a:visited{text-decoration: none; color:#blue}
    a.menu{color:blue; text-decoration:none;}
    a.menu:hover{text-decoration:underline;color:blue;}
    a.menu:visited{color:#800080;}
    td {font-size: 9pt;}
    .FONT1 {FONT-FAMILY: ??; FONT-SIZE: 11pt; LINE-HEIGHT: 16pt}
    .FONT2 {FONT-FAMILY: ??; FONT-SIZE: 9pt; LINE-HEIGHT: 14pt}
    .big {font-family: Arial, Helvetica, ??; font-size: 13pt; font-weight: bold}
    .cur {font-family: ??; font-size: 9pt; color: #ff0000}
    .chn {font-family: ??; font-size: 9pt}
    .dir {font-family: ??; font-size: 11pt; font-weight: bold}
    .sub {font-family: ??; font-size: 9pt}
    .hdr {font-family: ??; font-size: 11pt; font-weight: bold}
    .itm {FONT-FAMILY: ??; FONT-SIZE: 9pt; LINE-HEIGHT: 14pt}
    .FONT2 {FONT-FAMILY: ??; FONT-SIZE: 9pt; LINE-HEIGHT: 14pt}
    .eng {font-family: Arial, Helvetica, ??; font-size: 9pt}
    a.hover {color: red}
    .cssNoBorder { border-style: solid; border-width: 0;font-family:"??";font-size:12px}
    -->
    </style>
    <style type="text/css">
    .bot {
    font-family: "??"; 
    font-size: 9pt; font-style: normal; 
    color: #000000; 
    background-color: #F7F5ED; 
    border-style: solid; 
    border-top-width: 1px; 
    border-right-width: 1px; 
    border-bottom-width: 1px; 
    border-left-width: 1px}
    </style>
    </head>
      

  4.   

    <configuration>
       <system.web>
          <globalization requestEncoding="GB2312" responseEncoding="GB2312"/> 
       </system.web>
    </configuration>
      

  5.   

    经过测试,如果直接读该(不使用post method)
    url:http://www.travelsky.com/gb/41find.jsp
    读出来中文也是乱码。奇怪??
    <script src=/gb/js/head41.js></script><script src=/gb/js/floater.js></script>
    <table width=652 align=center bgcolor=#eef0ff><form method=post name=findspot action=/gb/41find.jsp><tr><td><a href=/gb/index.jsp?page=4&subpage=1><b>????</b></a></td><td>????:<select name=province><option selected value=>???<option>??<option>??<option>??<option>??<option>??<option>??<option>??<option>??<option>??<option>??<option>??<option>??<option>???<option>??<option>??<option>??<option>??<option>??<option>??<option>???<option>??<option>??<option>??<option>??<option>??<option>??<option>??<option>??<option>??<option>??<option>??<option>??<option>??<option>??</select></td>
    <td>????:<select name=theme><option selected value=>???<option>???<option>???<option>???<option>???<option>???<option>???<option>???<option>???<option>???<option>???</select></td>
    <td>????:<input type=text name=freeStr><input type=submit value=??></td></form><form name=form1 method=post action=/gb/41.jsp><input type=hidden name=province></form></tr></table>
    <table border=0 cellspacing=0 cellpadding=0 align=center><tr><td><img src=/gb/image/search_1.gif width=64 height=54></td><td valign=bottom><img src=/gb/image/search_2.gif width=112 height=47></td><td valign=bottom><img src=/gb/image/search_3.gif width=402 height=47></td></tr></table><table align=center width=630>
    <tr><td height=300 align=center><b>??????????????????</b></td></tr></table>
    <script src=/gb/js/bottom.js></script></body></html>
      

  6.   

    出现乱码时因为对StreamReader指定的初始编码方式不对,可以用获取系统的当前 ANSI 代码页的编码方式来初始化就OK了,
    代码如下:
    StreamReader sr = new StreamReader(objResponse.GetResponseStream(), System.Text.Encoding.Default );