From d6d7e2127cc87059f21ed6f5d3d393b367bbaff7 Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Sun, 8 Jul 2007 07:53:48 +0000 Subject: Who would have known that the only way of specifying utf-8 without preamble, is to not specify encoding at all. Or 'null' when sending an Encoder. --- Common/XmlRpcCS/XmlRpcSerializer.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'Common/XmlRpcCS/XmlRpcSerializer.cs') diff --git a/Common/XmlRpcCS/XmlRpcSerializer.cs b/Common/XmlRpcCS/XmlRpcSerializer.cs index b682f69..b3b9af3 100644 --- a/Common/XmlRpcCS/XmlRpcSerializer.cs +++ b/Common/XmlRpcCS/XmlRpcSerializer.cs @@ -56,16 +56,15 @@ namespace Nwc.XmlRpc { using (MemoryStream memStream = new MemoryStream(4096)) { - XmlTextWriter xml = new XmlTextWriter(memStream, Encoding.UTF8); + XmlTextWriter xml = new XmlTextWriter( memStream, null ); xml.Formatting = Formatting.Indented; - xml.Indentation = 4; + xml.Indentation = 4; Serialize(xml, obj); xml.Flush(); byte[] resultBytes = memStream.ToArray(); UTF8Encoding encoder = new UTF8Encoding(); - String returns = encoder.GetString( resultBytes, 0, resultBytes.Length ); xml.Close(); return returns; -- cgit v1.1