C# Help reading foreign characters using StreamReader

后端 未结 10 1289
别那么骄傲
别那么骄傲 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:08

    For swedish Å Ä Ö the only solution form the ones above working was:

    Encoding.GetEncoding("iso-8859-1")
    

    Hopefully this will save someone time.

提交回复
热议问题