解决读取文本文件乱码问题.我采取的是读取前先判断文本文件格式. StreamReader sr = new StreamReader(fullfileName, GetFileEncodeType(fullfileName)) public System.Text.Encoding GetFileEncodeType(string filename) { System.IO.FileStream fs = new System.IO.FileStream(filename, System.IO.…