1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-10-21 14:53:44 +03:00

fixed to skip (if necessary) the BOM for encoding 'utf-16'. Completes the

* parserInternals.c: fixed to skip (if necessary) the BOM for
  encoding 'utf-16'.  Completes the fix for bug #152286.
* tree.c, parser.c: minor warning cleanup, no change to logic
This commit is contained in:
William M. Brack
2004-12-25 10:14:57 +00:00
parent ff349110cc
commit 1d8c9b291e
5 changed files with 16 additions and 6 deletions

View File

@@ -1145,7 +1145,8 @@ xmlSwitchInputEncoding(xmlParserCtxtPtr ctxt, xmlParserInputPtr input,
* UTF-16
*/
if ((handler->name != NULL) &&
(!strcmp(handler->name, "UTF-16LE")) &&
(!strcmp(handler->name, "UTF-16LE") ||
!strcmp(handler->name, "UTF-16")) &&
(input->cur[0] == 0xFF) && (input->cur[1] == 0xFE)) {
input->cur += 2;
}