StreamWriter and UTF-8 Byte Order Marks
I'm having an issue with StreamWriter and Byte Order Marks. The documentation seems to state that the Encoding.UTF8 encoding has byte order marks enabled but when files are being written some have the marks while other don't. I'm creating the stream writer in the following way: this.Writer = new StreamWriter(this.Stream, System.Text.Encoding.UTF8); Any ideas on what could be happening would be appreciated. As someone pointed that out already, calling without the encoding argument does the trick. However, if you want to be explicit, try this: using (var sw = new StreamWriter(this.Stream, new