XMLDocument and UTF-16

I’m trying to parse the Chinook database XML that they offer url=https://chinookdatabase.codeplex.com/releases/view/55681[/url]
The XML file is defined as UTF-16 in the header, but no matter what way I define the incoming string as UTF-16 I continue to get the error:

msg:XML parser error 19: encoding specified in XML declaration is incorrect

My current workaround is to replace out that UTF-16 for UTF-8, and lie to XMLDocument. Which, surprise, works like a charm.
I don’t have time to verify that this solution doesn’t in fact destroy something in the data, though.

Does anyone have any experience reading an XML file that utilizes UTF-16?

yes. We also simply remove the UTF-16 and convert to UTF-8 in Xojo before.

Thank you for your insight, Christian :slight_smile: