0

I have an SSIS package that imports XML files. I am receiving the following error before any data is being imported in.

Error: The XML Source was unable to process the XML data. Invalid character in the given encoding. Line 2, position 2448.

Line 2, position 2448 contains an umlaut in a value that I don't reference. I have tried changing the XSD encoding to (utf-16 and ISO-8859-1). Any help is greatly appreciated.

  • You could write a script task that replaces any extended characters with something else and place it ahead of your dataflow task in your package. – Tab Alleman Dec 07 '15 at 15:11
  • Possible duplicate of [What is character encoding and why should I bother with it](http://stackoverflow.com/questions/10611455/what-is-character-encoding-and-why-should-i-bother-with-it) – Raedwald Jan 21 '16 at 13:16

1 Answers1

0

So I was able to get around this by converting the column to string using Derived Column. My issue was having accents in the first name: André. In my XML source I created a new XSD file then opened advance Editor. Click on input and output properties. Expanded both External and Output columns and converted my column to a "Unicode text Stream [DT_NTEXT]". once that was done. I then use Derived Column to convert my column back to unicode string (DT_WSTR). worked like a charm.

Tdubs
  • 29
  • 7