summaryrefslogtreecommitdiff
path: root/parserInternals.c
diff options
context:
space:
mode:
authorWilliam M. Brack <wbrack@src.gnome.org>2004-12-25 10:14:57 +0000
committerWilliam M. Brack <wbrack@src.gnome.org>2004-12-25 10:14:57 +0000
commit1d8c9b291ed3b9c09b7f0ef71308bffebe237b4c (patch)
tree5dea899c0a853e8a3c6454b5beb345aabb9da209 /parserInternals.c
parentff349110ccb0b5c6d437848a8b254d93fbaced18 (diff)
downloadlibxml2-1d8c9b291ed3b9c09b7f0ef71308bffebe237b4c.tar.gz
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
Diffstat (limited to 'parserInternals.c')
-rw-r--r--parserInternals.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/parserInternals.c b/parserInternals.c
index 994aaa24..807169bd 100644
--- a/parserInternals.c
+++ b/parserInternals.c
@@ -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;
}