http://www.csdn.net/expert/topic/388/388192.shtm
你令我想起我错过了一只QQ公仔。

解决方案 »

  1.   

    看看这个类:System.Text.Encoding我使用Encoding.Default来读取这个中文文件
      

  2.   

    sorry.二楼的那个地址我连不上了。是删除了吗?
    能给个新的吗?谢谢。
      

  3.   

    string filename = "abc.txt";
    StreamReader srRead;
    srRead = new StreamReader((System.IO.Stream)File.OpenRead(filename),System.Text.Encoding.Default);
    srRead.BaseStream.Seek(0, SeekOrigin.Begin);
    string strText = srRead.ReadToEnd();
    srRead.Close();
      

  4.   

    CForce()
    http://www.csdn.net/expert/topic/388/388192.xml?temp=.5050928那次我的QQ公仔寄到北京去了:)
    还有一只好漂亮的公仔女孩,肥嘟嘟的。舍不得送了。
      

  5.   

    查msdn有几个关于encode的,用utf-16的试试。
    我也遇到这个问题,从局域网的一台主机向另一台主机发送信息,也使用RichTextBox,用的ASCIIEncoding,但是如果用中文发送另一端接受到的就是一串????,后来看msdn才晓得它only support character values between u+0000 and u+007f。现在正打算用utf-16。
      

  6.   

    StreamReader srRead = new StreamReader("c:\\abc.txt",System.Text.Encoding.Default);
    string strText = srRead.ReadToEnd();
    srRead.Close();