FileStream fs=new FileStream(("c:/a.htm",FileMode.Create);
StreamWriter sw=new StreamWriter(fs,System.Text.Encoding.Default);
sw.Write("中国解放军");
sw.Flush();
sw.Close();
应该可以了

解决方案 »

  1.   

    同楼上看一下StreamWriter的构造函数用可用指定的编码方式
      

  2.   

    1,改动Webconfig文件
    2,<meta http-equiv="Content-Type" content="text/html; charset=gb2312" >
      

  3.   

    这样也可以:
    StreamWriter sw=new StreamWriter(fs,System.Text.Encoding.GetEncoding("gb2312"));
      

  4.   

    好像不成吧,他没按html格式写,会正确显示马?
      

  5.   

    to 楼上可以的,HTML 格式也是文本文件,HTML 只是一种描述