Nicksop,
Remember that when you read a file into a string it is converted from the
encoding in the file to Unicode, that when you write it is converted from
Unicode to the encoding in the file.
You can use System.Text.Encoding.Default to get the current Windows ANSI
Code page encoding object. You can use System.Text.Encoding.GetEncoding to
get a specific code page (such as an OEM one).
You can use the
System.Globalization.CultureInfo.CurrentCulture.TextInfo.OEMCodePage to get
the current OEM code page.
Imports System.IO
Imports System.Text
Imports System.Globalization
Dim input As New StreamReader(inputPath, Encoding.Default)
Dim output As New StreamWriter(outputPath, False,
Encoding.GetEncoding(CultureInfo.CurrentCulture.TextInfo.OEMCodePage))
Dim line As String
line = input.ReadLine()
Do Until line Is Nothing
output.WriteLine(line)
line = input.ReadLine()
Loop
input.Close()
output.Close()
Hope this helps
Jay