C# Help reading foreign characters using StreamReader

后端 未结 10 1295
别那么骄傲
别那么骄傲 2020-11-29 02:46

I\'m using the code below to read a text file that contains foreign characters, the file is encoded ANSI and looks fine in notepad. The code below doesn\'t work, when the fi

10条回答
  •  既然无缘
    2020-11-29 03:25

    Yes, it could be with the actual encoding of the file, probably unicode. Try UTF-8 as that is the most common form of unicode encoding. Otherwise if the file ASCII then standard ASCII encoding should work.

提交回复
热议问题