我正在使用下面的代码读取一个包含外国字符的文本文件,该文件是ANSI编码的,并且在记事本中看起来没有问题。下面的代码不起作用,当读取文件值并在数据网格中显示字符时,字符显示为正方形,是否会在其他地方出现其他问题?StreamReader reader = new StreamReader(inputFilePath, System.Text.Encoding.ANSI);
using (reader = File.OpenText
我正在尝试将一个文件读入一个字符串,然后将其发送到另一个应用程序。Main(string[] args) try // Create an instance of StreamReaderto read from a file.
// The using statement also closes the StreamReader.using (StreamR