// open our input file
StreamReader readerEDI = new StreamReader(@"input.txt");
// setup custom unicode encoding, disable big and little endian bom's
UnicodeEncoding unicode = new UnicodeEncoding(false, false);
// output file stream
Stream filestream = new FileStream(@"output", FileMode.CreateNew);
// instantiate new streamwriter, apply our custom unicode encoding
StreamWriter writerEDI = new StreamWriter(filestream, unicode);
// write to file
writerEDI.Write(readerEDI.ReadToEnd());
// clean up
readerEDI.Close();
Remember Me
Page rendered at Wednesday, March 10, 2010 1:02:57 PM (South Africa Standard Time, UTC+02:00)
Disclaimer The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.