Reputation: 1
I'm trying to update a column of type XML.
Text to be inserted in the XML fields: "& Decision ↨‼ Agreement"
Text converted to XML: <?xml version="1.0" encoding="utf-16"?><Informations xmlns="http://monschema"><Text lGic="fdf475bc-9fed-4f61-b321-f81949cb51ca" id="71e231e6-ecbd-4848-ba6f-004bdddefb79">& Décision   Accord</Text></Informations>
Error: Msg 9420, Level 16, State 1, Line 7 XML parsing: line 1, character 263 character non-compliant XML
I do not understand why the character with ascii code "" has a problem.
If I replace  by  , it works !
Can you help me?
Thank you in advance
Upvotes: 0
Views: 2098
Reputation: 1
I solved my problem.
This character is from a SQL obtenues view on ORACLE database. The character -> on ORACLE Is interpreted by ↨ on SQL SERVER.
I'll do a replace in my view
Upvotes: 0
Reputation: 201528
The character references 
and 
denote control characters that are disallowed in XML 1.0. The real problem here is that they do not denote the characters you have in the text. The characters “↨‼” are U+21A8 UP DOWN ARROW WITH BASE and U+203C DOUBLE EXCLAMATION MARK, so they should be written as ↨‼
.
The reason why get the odd character references is probably that in the CP437 encoding, “↨‼” are placed in code positions 12 and 13 (hex.). So this is an encoding confusion, and some conversion has applied a wrong conversion. In XML, the numbers in character references always mean Unicode code numbers.
Upvotes: 1
Reputation: 21713
These control characters are not supported in XML version 1.0 documents.
You should be able to change your version to 1.1 in the version
attribute of the document, in which case the document should validate.
Upvotes: 0