I'm using IO.File.ReadAllLines(FileName) to read all lines from text file to array of strings at once. Problem is, text lines include ANSI characters above ASCII value 127 (Scandinavian letters e.g. "Ä" (Ascii 196), "ö" (Ascii 246) and "é" (Ascii 233). Array is build up nicely, but all chars above ascii value 127 are not shown right. How can I use ANSI character set with .ReadAllLines to correct this problem? In VB6 with "Open Filename For Input As #1 / Line Input #1, txtLine" there wasn't any problem.
Any suggestions? Thank's.

Try UTF8 or some of the other encodings:

Dim arr_strData As String() =
         File.ReadAllLines("..\..\AnsiFile.txt", System.Text.Encoding.UTF8)
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.