locked
Encoding problem RRS feed

  • Question

  • Hi, 

     

    I'm struggling to understand why I'm getting the following error when I call "sp_xml_preparedocument"

     

             "XML parsing error: Switch from current encoding to specified encoding not supported."

     

    The header of the xml document contains "<?xml version="1.0" encoding="UTF-8"?>"

     

    XML data is passed into my stored procedure via an "ntext" variable so I would assume that there would'nt be an encoding issue.

     

    Does anyone have any pointers for me?   BTW I'm using SQL Server 2000.

     

    Many thanks in advance.

     

    Ian.

     

    PS I've just changed the parameter from "ntext" to "text" and it works fine.   Don't understand even more now.

    Thursday, July 12, 2007 8:59 AM

Answers

  • I think ntext uses UTF-16 (respectively the older UCS-2) not UTF-8.
    Thursday, July 12, 2007 1:35 PM