I got an OEM file and I use a StreamReader to read it but I got a problem that the file may got some characters that StreamReader can not read so it reads only some data of it.
Dim StreamToDisplay As New StreamReader("C:OEMFILE.DAT", _ Encoding.GetEncoding(CultureInfo.CurrentCulture.TextInfo.OEMCodePage))
Dim aLine As String
aLine = StreamToDisplay.ReadLine
TextBox1.Text += aLine + Chr(13) + Chr(10)
Loop Until aLine = Nothing
When it ends then I see at the TextBox that the file is has not be read right. I tried the FileOpen method but the same problem occured.
The encoding is correct cause when I open the OEMFILE.DAT through the Notepad and simple save it with the same name then the StreamReader can read it correct. But the point is that it must be done without the help of the Notepad.
Any help ?