Dim fileName = "filename.txt"
sw = New StreamWriter(fileName, True, System.Text.Encoding.GetEncoding(437))
Dim line_to_write = "Hello Señor, are you by any chance from the Martínez family? Did you know they named their daughter Zöe and she's studying français?"
sw.WriteLine(line_to_write)
sr = New StreamReader(fileName, True)
Console.WriteLine("Encoding of the file is: {0}", sr.CurrentEncoding)
Dim line_read_in = sr.ReadLine()
Console.WriteLine("Content of the file line read is: {0}", line_read_in)
sr2 = New StreamReader(fileName, System.Text.Encoding.GetEncoding(437))
Console.WriteLine("Encoding of the file is: {0}", sr2.CurrentEncoding)
Dim line2_read_in = sr2.ReadLine()
Console.WriteLine("Content of the file line read is: {0}", line2_read_in)