using System.IO;StreamWriter sw = new StreamWriter("yourhtml.html", false, System.Text.Encoding.GetEncoding("GB2312"));
sw.Write(YourHTMLString);
sw.Close();

解决方案 »

  1.   

    what is in your html string? try to view the source in IE
      

  2.   

    string htmlcode = "<html><body>ddddddddddddddd</body></html>";StreamWriter sw = new StreamWriter(@"c:\yourhtml.html", false, System.Text.Encoding.GetEncoding("GB2312"));
    sw.Write(htmlcode);
    sw.Close();
      

  3.   

    加头部
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
      

  4.   

    string htmlcode = "<html><meta http-equiv="Content-Type" content="text/html;charset=gb2312"><body>ddddddddddddddd</body></html>";soulroom是这个意思。
      

  5.   

    我用IE打开,内容如下xhn_21199锛?/FONT>浣犲ソ锛?/FONT>
     
    銆€銆€66666666
     
    銆€銆€銆€銆€銆€銆€銆€銆€鑷?BR>绀硷紒
     
     銆€銆€銆€銆€銆€銆€          榛勫畻鎴?BR>                       [email protected]
                           2003-11-17