Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. COWrong assumption, the column is not TEXT, only a parameter of type TEXT is being used to accept the XML string; TEXT is used because varchar(8000) has a restriction on length; The problem *is* with the parser on sqlserver. Server: Msg 6603, Level 16, State 1, Procedure sp_xml_preparedocument, Line 40 XML parsing error: An invalid character was found in text content. As i said, when i declare the XML string as ISO-8859-1, no error occurs on the sproc, so the parser is treating ASCII 146 as acceptable.
      singulars
    2. COThe problem is still `TEXT`, actually. Specifically, when you pass a Unicode `string` to your sproc, it has to be converted to non-Unicode encoding to match `TEXT`; the result is of course not encoded using UTF, and which encoding it is going to use to convert isn't easy to determine. If you have control over sproc, just replace `TEXT` with `NTEXT`, and don't bother with ancodings
      singulars
    3. COI arrived at the same conclusion to use NTEXT just prior to reading your last comment, then i won't need to declare <br/> ?xml version="1.0" encoding="ISO-8859-1"?<br/> to make it work (or won't need to bother with encodings as you have said). Can you please just clarify a few things:<br/> are you saying if i use NTEXT, the xml string that i pass will be interpreted by the xml parser as UTF-16? <br/>why does keeping TEXT and declaring the xml string as ISO-8859-1 works?
      singulars
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload