From 1d8c9b291ed3b9c09b7f0ef71308bffebe237b4c Mon Sep 17 00:00:00 2001 From: "William M. Brack" Date: Sat, 25 Dec 2004 10:14:57 +0000 Subject: 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 --- parserInternals.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'parserInternals.c') 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; } -- cgit v1.2.1