Imported Upstream version 6.10.0.79

Former-commit-id: e3f28654e3f3f79beec5745e828e2fc3c08ae497
This commit is contained in:
Xamarin Public Jenkins (auto-signing)
2020-02-20 08:44:57 +00:00
parent 6b40127559
commit c1b35613f4
58 changed files with 528 additions and 442 deletions

View File

@ -429,13 +429,9 @@ namespace System.Xml.Serialization
}
}
static Encoding DefaultEncoding = Encoding.Default;
public void Serialize (Stream stream, object o)
{
XmlTextWriter xmlWriter = new XmlTextWriter (stream, DefaultEncoding);
xmlWriter.Formatting = Formatting.Indented;
Serialize (xmlWriter, o, null);
Serialize (stream, o, null);
}
public void Serialize (TextWriter textWriter, object o)
@ -452,7 +448,7 @@ namespace System.Xml.Serialization
public void Serialize (Stream stream, object o, XmlSerializerNamespaces namespaces)
{
XmlTextWriter xmlWriter = new XmlTextWriter (stream, DefaultEncoding);
XmlTextWriter xmlWriter = new XmlTextWriter (stream, Encoding.UTF8);
xmlWriter.Formatting = Formatting.Indented;
Serialize (xmlWriter, o, namespaces);
}