Closed wouterbeek closed 8 years ago
The problem is that it doesn't get that far. It enables UCS-2 (should be UTF-16) decoding and than the entire <?xml ... is no longer readable. So, it just sees CDATA and that is not allowed before the first element. At a higher level you could retry bij seeking back to the start and change the encoding to a superset of ASCII (e.g., UTF-8) and try to see whether you get a sensible document opening.
Ok, will try that. Thanks!
I have an XML file with the following first line (notice the UTF-16 BOM):
This is clearly a buggy file, but
sgml_parse/2
gives a warning that is quite misleading:Maybe the waning should be something like "Conflict between BOM and XML encoding attribute"?