How do I open a text file containing high bit characters such as é which is ASCII 233 (E9 hex)?
I've tried different things with stream reader but have not been able to get it to read the line correctly. It reads the line and replaces that character with a ? (63 or 3F).
Here are some things I've tried:
After it is open I do SR.ReadLine to get the next line in a string variable.
None of these seem to work. Is there a different way I should open the file? Or a different stream reader?
Thanks in advance for any help!
Pat B
I've tried different things with stream reader but have not been able to get it to read the line correctly. It reads the line and replaces that character with a ? (63 or 3F).
Here are some things I've tried:
Code:
Using SR As New StreamReader(IO.File.Open(Common.Folder_MM2010MailPieceProcessing & NewFilename, FileMode.Open), True)
Using SR As StreamReader = IO.File.OpenText(Common.Folder_MM2010MailPieceProcessing & NewFilename)
Using SR As New StreamReader(IO.File.Open(Common.Folder_MM2010MailPieceProcessing & NewFilename, FileMode.Open), text.Encoding.ASCII)
Using SR As New StreamReader(IO.File.Open(Common.Folder_MM2010MailPieceProcessing & NewFilename, FileMode.Open), Text.Encoding.UTF8)
After it is open I do SR.ReadLine to get the next line in a string variable.
None of these seem to work. Is there a different way I should open the file? Or a different stream reader?
Thanks in advance for any help!
Pat B