Characters with accent in XML string

  • Hi,

    I'm copying data from a varchar(max) column to an XML column so that I can use XQuery on the data.

    Sometimes the load will fail with this error:

    XML parsing: line 30, character 28, illegal xml character [SQLSTATE 42000] (Error 9420). The step failed.

    When I look through the XML string the attribute it will have non ascii characters, ยจ ร€ ร‡,

    this casues the load to fail.

    Any suggestions on how to address this issue?

  • OK figured it out....

    varchar(max) source data needs to be the unicode equivalent nvarchar(max)

    then change the encoding on the xml from utf-8 to utf-16

    repopulate the XML column.

    ๐Ÿ™‚

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply