XmlWriter, Strings and Byte Order Marks

Posted by: Rick Strahls WebLog, on 04 Feb 2007 | View original

UTF-8 with an XmlWriter (or even HtmlTextWriter for that matter) can sometimes be tricky if youre sending output back into anything but a file. If you write data to a string or data to a stream that gets immediately fed into an output stream in a Web application or a POST buffer for an HTTP request you might find that the formatting of the XML generated usually will blow up.   Typically you have code like this:   MemoryStream ms = new MemoryStream();            ...

Advertisement

Similar Posts

  • Hack GridView Custom Paging with ObjectDataSource more
  • Ordering guarantees in SQL Server... more
  • Ordering guarantees in SQL Server... more
  • MySQL Data truncation Error more
  • LLBLGen Pro v1.0.2005.1 released! more
  • Displaying the Contents (and Row Versions) of an ADO.NET DataSet more
  • How to extend TableAdapter methods more
  • How to extend TableAdapter methods more
  • How to extend TableAdapter methods more

News Categories

.NET | ADO.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Community Server | dasBlog | DataGrid | DataSet | Debugger | DotNetNuke | Events | GridView | IIS | Indigo | JavaScript | Mobile | Mono | Patterns and Practices | Performance | Podcast | Refactor | Regex | Security | Sharepoint | Silverlight | Smart Client Applications | Software | SQL | VB.NET | Visual Studio | W3 | WCF | WinFx | WPF | WSE | XAML | XLinq | XML | XSD