From 04aa13a086239b8d628821809bef9c9585c35f8f Mon Sep 17 00:00:00 2001 From: AliciaRaven Date: Thu, 22 May 2014 00:51:33 +0100 Subject: Fix mantis 6973. Prevent BOM being prefixed to message XML which was causing an exception when the service tried to read the data later on. Signed-off-by: Oren Hurvitz --- OpenSim/Addons/OfflineIM/Service/OfflineIMService.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Addons/OfflineIM/Service/OfflineIMService.cs') diff --git a/OpenSim/Addons/OfflineIM/Service/OfflineIMService.cs b/OpenSim/Addons/OfflineIM/Service/OfflineIMService.cs index 690c955..02084ff 100644 --- a/OpenSim/Addons/OfflineIM/Service/OfflineIMService.cs +++ b/OpenSim/Addons/OfflineIM/Service/OfflineIMService.cs @@ -104,7 +104,7 @@ namespace OpenSim.OfflineIM using (MemoryStream mstream = new MemoryStream()) { XmlWriterSettings settings = new XmlWriterSettings(); - settings.Encoding = Encoding.UTF8; + settings.Encoding = Util.UTF8NoBomEncoding; using (XmlWriter writer = XmlWriter.Create(mstream, settings)) { @@ -112,7 +112,7 @@ namespace OpenSim.OfflineIM writer.Flush(); } - imXml = Util.UTF8.GetString(mstream.ToArray()); + imXml = Util.UTF8NoBomEncoding.GetString(mstream.ToArray()); } OfflineIMData data = new OfflineIMData(); -- cgit v1.1