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:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user