read MS-DOS text file

G

Guest

Hi to all

I'm trying to read an old MS-DOS text file, using a StreamReader, but I can't retrieve the original text, I have used all the possible encoding UTF-7,UTF-8, Unicode and ASCII. How I can do it
Thanks

Abel
 
J

Jon Skeet [C# MVP]

Abel said:
I'm trying to read an old MS-DOS text file, using a StreamReader, but
I can't retrieve the original text, I have used all the possible
encoding UTF-7,UTF-8, Unicode and ASCII. How I can do it?

Well, you need to find out what encoding it really *is* in. It may well
be code page 437, in which case just use Encoding.GetEncoding(437).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top