这个问题出现过好多次,每次查完就忘,好气,在这做个小tip
Code (Wrong)
StreamReader sr = new StreamReader(Filename);
String tmp = sr.ReadLine();
Debug.WriteLine(tmp);
Result (Wrong)
Code (Correct)
StreamReader sr = new StreamReader(Filename,Encoding.Default);
String tmp = sr.ReadLine();
Debug.WriteLine(tmp);
##Result (Correct)
(图片中中文为随机敲击键盘生成,不含任何含义)