Skip to content

Generating UTF-8 string s with out Byte Order Marks

Rick Strahl has a good blog entry on how get data from XmlTextWriter with having a Byte Order Mark (BOM) at the start of the data. The trick is to create the encoding manually and pass it with the constructor to XmlTextWriter.