diff options
author | lbsa71 | 2007-07-08 07:53:48 +0000 |
---|---|---|
committer | lbsa71 | 2007-07-08 07:53:48 +0000 |
commit | d6d7e2127cc87059f21ed6f5d3d393b367bbaff7 (patch) | |
tree | 9acd19842a397893344885dd8a94448bc421a8c3 /Common/XmlRpcCS/XmlRpcSerializer.cs | |
parent | * Maintainence: Applying Dan's ODE Patch to Trunk (diff) | |
download | opensim-SC_OLD-d6d7e2127cc87059f21ed6f5d3d393b367bbaff7.zip opensim-SC_OLD-d6d7e2127cc87059f21ed6f5d3d393b367bbaff7.tar.gz opensim-SC_OLD-d6d7e2127cc87059f21ed6f5d3d393b367bbaff7.tar.bz2 opensim-SC_OLD-d6d7e2127cc87059f21ed6f5d3d393b367bbaff7.tar.xz |
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.
Diffstat (limited to 'Common/XmlRpcCS/XmlRpcSerializer.cs')
-rw-r--r-- | Common/XmlRpcCS/XmlRpcSerializer.cs | 5 |
1 files changed, 2 insertions, 3 deletions
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 | |||
56 | { | 56 | { |
57 | using (MemoryStream memStream = new MemoryStream(4096)) | 57 | using (MemoryStream memStream = new MemoryStream(4096)) |
58 | { | 58 | { |
59 | XmlTextWriter xml = new XmlTextWriter(memStream, Encoding.UTF8); | 59 | XmlTextWriter xml = new XmlTextWriter( memStream, null ); |
60 | xml.Formatting = Formatting.Indented; | 60 | xml.Formatting = Formatting.Indented; |
61 | xml.Indentation = 4; | 61 | xml.Indentation = 4; |
62 | Serialize(xml, obj); | 62 | Serialize(xml, obj); |
63 | xml.Flush(); | 63 | xml.Flush(); |
64 | 64 | ||
65 | byte[] resultBytes = memStream.ToArray(); | 65 | byte[] resultBytes = memStream.ToArray(); |
66 | 66 | ||
67 | UTF8Encoding encoder = new UTF8Encoding(); | 67 | UTF8Encoding encoder = new UTF8Encoding(); |
68 | |||
69 | String returns = encoder.GetString( resultBytes, 0, resultBytes.Length ); | 68 | String returns = encoder.GetString( resultBytes, 0, resultBytes.Length ); |
70 | xml.Close(); | 69 | xml.Close(); |
71 | return returns; | 70 | return returns; |