StreamReader  sr;
        string fc;
        sr = File.OpenText(@"E:\银狐\朋友.txt");
        while(sr.Peek ()!=-1)
        {
            fc=sr.ReadLine ();
            fc = fc.ToString();
            this.Label2.Text+= fc+"<br>";
           
        }
        sr.Close(); 为什么在Label控件里汉字显示乱码而英文字母显示正常?在线等!!不胜感激!!

解决方案 »

  1.   

     
    using (StreamReader sr = new StreamReader(filename, Encoding.Default))
                    {
                        while ((line = sr.ReadLine()) != null)
                        {
                            stringArray = line.Split(new char[] { ' ' }, StringSplitOptions.RemoveEmptyEntries);
                      }
                    }
      

  2.   

    打开你的txt文档,另存一下,选择 utf-8编码。