Created
October 3, 2014 17:57
-
-
Save hvitorino/a3e33db69cb8352133ed to your computer and use it in GitHub Desktop.
StringWriter com encoding Windows-1252 http://stackoverflow.com/questions/427725/how-to-put-an-encoding-attribute-to-xml-other-that-utf-16-with-xmlwriter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.IO; | |
using System.Text; | |
public sealed class StringWriterEncoded : StringWriter | |
{ | |
public override Encoding Encoding | |
{ | |
get { return System.Text.Encoding.GetEncoding("Windows-1252"); } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment