[Mono-list] Fix for StreamWriter
J. Perkins
jason@379.com
06 Nov 2002 14:21:39 -0500
I didn't see an entry in bugzilla for this, but if you create a
StreamWriter like so:
StreamWriter sw = new StreamWriter("myfile.txt");
...you'll get spurious bytes before and after all of the text you write
to the stream. I managed to track it down, the StreamWriter's
UTF8Encoding object is writing the UTF8 identifier into the output. The
fix is simple: in mcs/class/corlib/System.IO/StreamWriter.cs lines 67
and 70, replace 'Encoding.UTF8' with 'new UTF8Encoding(false,true)'.
While I'm here, I am unable to see the CVS repository from here
(corporate firewall), and all of the instructions I have been able to
find about creating patches rely on cvs. Is there a way to generate a
patch without using cvs?
Thanks,
Jason
379