I'm trying to save presentation with text added as HTML, using AddFromHtml method.
But I get The surrogate pair is invalid, when trying to save Spanish text.
Could you help me solve this issue ?
Here is the full stack trace:
- Code: Select all
System.ArgumentException: The surrogate pair (0xD835, 0x2E) is invalid. A high surrogate character (0xD800 - 0xDBFF) must always be paired with a low surrogate character (0xDC00 - 0xDFFF).
at System.Xml.XmlTextEncoder.WriteSurrogateChar(Char lowChar, Char highChar)
at System.Xml.XmlTextEncoder.Write(String text)
at System.Xml.XmlTextWriter.WriteString(String text)
at System.Xml.XmlElement.WriteContentTo(XmlWriter w)
at System.Xml.XmlElement.WriteTo(XmlWriter w)
at System.Xml.XmlElement.WriteContentTo(XmlWriter w)
at System.Xml.XmlElement.WriteTo(XmlWriter w)
at System.Xml.XmlElement.WriteContentTo(XmlWriter w)
at System.Xml.XmlElement.WriteTo(XmlWriter w)
at System.Xml.XmlElement.WriteContentTo(XmlWriter w)
at System.Xml.XmlElement.WriteTo(XmlWriter w)
at System.Xml.XmlElement.WriteContentTo(XmlWriter w)
at System.Xml.XmlElement.WriteTo(XmlWriter w)
at System.Xml.XmlElement.WriteContentTo(XmlWriter w)
at System.Xml.XmlElement.WriteTo(XmlWriter w)
at System.Xml.XmlElement.WriteContentTo(XmlWriter w)
at System.Xml.XmlElement.WriteTo(XmlWriter w)
at System.Xml.XmlElement.WriteContentTo(XmlWriter w)
at System.Xml.XmlElement.WriteTo(XmlWriter w)
at System.Xml.XmlElement.WriteContentTo(XmlWriter w)
at System.Xml.XmlElement.WriteTo(XmlWriter w)
at System.Xml.XmlDocument.WriteContentTo(XmlWriter xw)
at spr.ᜀ(sprᢻ A_0, Stream A_1, XmlDocument A_2)
at spr.ᜀ(sprᢻ A_0, sprᜫ A_1)
at spr.ᜀ(Stream A_0, sprᜫ A_1, spr᧸ A_2)
at spr.ᜀ(Stream A_0, spr᧳ A_1, spr᧴ A_2)
at spr.ᜀ(Stream A_0, spr᧳ A_1)
at Spire.Presentation.Presentation.SaveToFile(Stream stream, FileFormat fileFormat)