Как я могу прочитать китайский текстовый файл с помощью C#, мой текущий код не может отобразить правильные символы:Как читать китайский текстовый файл с C#?
try
{
using (StreamReader sr = new StreamReader(path,System.Text.Encoding.UTF8))
{
// This is an arbitrary size for this example.
string c = null;
while (sr.Peek() >= 0)
{
c = null;
c = sr.ReadLine();
Console.WriteLine(c);
}
}
}
catch (Exception e)
{
Console.WriteLine("The process failed: {0}", e.ToString());
}
Самый полезный ответ! благодаря – CodeGuru 2013-03-04 08:50:49