RE: Invalid high surrogate character (0xDEB6).
- From: stcheng@xxxxxxxxxxxxxxxxxxxx (Steven Cheng[MSFT])
- Date: Fri, 08 Feb 2008 05:11:05 GMT
Thanks for your reply Dave,
I think it would be better to identify those nodes that may contains the
pontential problemtic data. Sure, you can perform an additional encoding on
the data so as to ensure it is proper unicode text range.
As you mentioned that all the data is of ASCII char, how were those ASCII
chars generated and embeded into the XML document?
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
From: =?Utf-8?B?RGF2aWQgVGhpZWxlbg==?= <thielen@xxxxxxxxxxxxx><JT7PTWUaIHA.1500@xxxxxxxxxxxxxxxxxxxxxx>
References: <BEFB912D-04CF-4210-BEA8-5CBA8964E270@xxxxxxxxxxxxx>
Subject: RE: Invalid high surrogate character (0xDEB6).
Date: Wed, 6 Feb 2008 21:05:01 -0800
is
My problem is I don't control the text that goes in many of the nodes &
attributes. Should I be encoding the text somehow? I assumed using the
XmlDocument methods that it would handle any necessary encoding.
Also, all of the text added in this case is ASCII.
--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com
Cubicle Wars - http://www.windwardreports.com/film.htm
"Steven Cheng[MSFT]" wrote:
Hi Dave,
As for the "Invalid high surrogate character" error you encountered, it
thedue to some Unicode specific validation in .NET XML API. Within the .Net
framework, there are lot of string validations for Unicode, not only for
XML. So, this is the correct behaviour.The problem is that the data in
stringXML you generated may contains some certain value that is valid in
generatedor XML, but not valid for UNICODE(utf-16 which has rules for surrogate).
From some former issue, I found that you may encounter this error when
you've encrypted some of the data in the xml which may cause the
anyvalue be invalid according to unicode surrogate pair rules. Is there
XMLparticular data included in your XML document? You can try simplify the
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notifdocument so as to locate the certain data fragment.
BTW, here is a blog article I've found which also mentioned this:
http://blogs.msdn.com/michkap/archive/2006/12/05/1212917.aspx
Sincerely,
Steven Cheng
Microsoft MSDN Online Support Lead
==================================================
Get notification to my posts through email? Please refer to
issuesications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent
followwhere an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each
theup response may take approximately 2 business days as the support
professional working with you may need further investigation to reach
situationsmost efficient resolution. The offering is not appropriate for
bestthat require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are
contactinghandled working with a dedicated Microsoft Support Engineer by
rights.Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no
elements--------------------
From: =?Utf-8?B?RGF2aWQgVGhpZWxlbg==?= <thielen@xxxxxxxxxxxxx>
Subject: Invalid high surrogate character (0xDEB6).
Date: Wed, 6 Feb 2008 17:25:01 -0800
I am building an XML document using the standard calls to create
xmlDoc.OuterXml.and
attributes. Occasionally I get the following when calling
C:\src\kahuna\AutoTag\AutoTagCore\net\windward\autotag\DocumentDataBuffer.cWhat's going on and how do I avoid this?net.windward.autotag.DocumentDataBuffer.SaveProfileToDoc(DocGlobal
System.ArgumentException occurred
Message="Invalid high surrogate character (0xDEB6). A high surrogate
character must have a value from range (0xD800 - 0xDBFF)."
Source="System.Xml"
StackTrace:
at System.Xml.XmlTextEncoder.Write(String text)
at System.Xml.XmlTextWriter.WriteString(String text)
at System.Xml.XmlText.WriteTo(XmlWriter w)
at System.Xml.XmlAttribute.WriteContentTo(XmlWriter w)
at System.Xml.XmlAttribute.WriteTo(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 System.Xml.XmlDocument.WriteTo(XmlWriter w)
at System.Xml.XmlNode.get_OuterXml()
at
docData, String docFileName) in
s:line 116
--
thanks - dave
david_at_windward_dot_net
http://www.windwardreports.com
Cubicle Wars - http://www.windwardreports.com/film.htm
.
- References:
- RE: Invalid high surrogate character (0xDEB6).
- From: Steven Cheng[MSFT]
- RE: Invalid high surrogate character (0xDEB6).
- From: David Thielen
- RE: Invalid high surrogate character (0xDEB6).
- Prev by Date: White spaces in tag names
- Next by Date: atom schema
- Previous by thread: RE: Invalid high surrogate character (0xDEB6).
- Next by thread: DOMDocument to XslCompiledTransform
- Index(es):
Relevant Pages
|