G
Gustaf Liljegren
I'm writing a console program that is supposed to read a bunch of old text
files written in CP437 encoding, extract parts of them and output
well-formed XML in UTF-8. First problem I run into is to make the conversion
from this antique codepage to UTF-8. The input file is read using the
StreamReader:
StreamReader file = new StreamReader(args[0]);
The output file is written using the XmlTextWriter:
XmlTextWriter writer = new XmlTextWriter("output.xml", Encoding.UTF8);
The result now, as expected, is that non-ASCII characters are skipped in the
output. What's the best way to make the conversion from CP437?
Thanks,
Gustaf
files written in CP437 encoding, extract parts of them and output
well-formed XML in UTF-8. First problem I run into is to make the conversion
from this antique codepage to UTF-8. The input file is read using the
StreamReader:
StreamReader file = new StreamReader(args[0]);
The output file is written using the XmlTextWriter:
XmlTextWriter writer = new XmlTextWriter("output.xml", Encoding.UTF8);
The result now, as expected, is that non-ASCII characters are skipped in the
output. What's the best way to make the conversion from CP437?
Thanks,
Gustaf