COmpensating for Mono bugs in XML encoding
This commit is contained in:
@@ -23,13 +23,16 @@ namespace Swarmops.Logic.Communications.Transmission
|
||||
|
||||
public static T FromXml (string xml)
|
||||
{
|
||||
// Compensate for Mono bugs
|
||||
// Compensate for stupid Mono encoding bugs
|
||||
|
||||
if (xml.StartsWith("?"))
|
||||
{
|
||||
xml = xml.Substring(1);
|
||||
}
|
||||
|
||||
xml = xml.Replace("�", "");
|
||||
xml = xml.Replace("\x00", "");
|
||||
|
||||
var serializer = new XmlSerializer(typeof(T));
|
||||
|
||||
var stream = new MemoryStream();
|
||||
|
||||
Reference in New Issue
Block a user