http://bugs.winehq.org/show_bug.cgi?id=24897
--- Comment #6 from Nikolay Sivov bunglehead@gmail.com 2010-10-27 18:46:47 CDT --- This file has valid UTF-8 BOM mark, and it is UTF-8 encoded. Specified encoding in a file is UTF-16, so it doesn't match BOM and actual encoding. If I understand XML spec right this case should be considered as a fatal error for a parser.
libxml2 does the following:
- detects input encoding using BOM; - finds encoding attribute in xml declaration, UTF-16 for this file; - encodings don't match and we didn't specify explicit encoding for parser context, so it means a fatal error for it.
This clearly needs some tests to figure out a possible workaround for that, I'll start with that. We did something similar for DOM parsing already, some mess with default parser encoding.