How to read Swedish characters properly from a txt file
I figured it out myself i.e System.Text.Encoding.Default
will support Swedish characters.
TextReader tr = new StreamReader(@"c:\testfile.txt", System.Text.Encoding.Default, true);
You need to change the System.Text.Encoding.UTF8 to System.Text.Encoding.GetEncoding(1252). See below
System.IO.TextReader tr = new System.IO.StreamReader(@"c:\testfile.txt", System.Text.Encoding.GetEncoding(1252), true);
tr.ReadLine(); //returns a string but Swedish characters are not appearing correctly