using (StreamReader reader = new StreamReader(filePath, GetEncoding(filePath)))
{
Console.WriteLine("读取文件" + filePath);
Console.WriteLine(reader.ReadToEnd());
Console.WriteLine("当前编码:" + reader.CurrentEncoding.EncodingName);
Console.WriteLine("************************************************************");
}
时间: 2024-10-12 20:26:50