diff --git a/ChangeLog b/ChangeLog index 3d41976b..8ec87383 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Sat Dec 25 18:10:02 HKT 2004 William Brack + + * 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 + Fri Dec 24 16:31:22 HKT 2004 William Brack * python/generator.py: added most required entires to diff --git a/config.h.in b/config.h.in index 590e0cec..ad774b17 100644 --- a/config.h.in +++ b/config.h.in @@ -258,7 +258,7 @@ /* Define to the version of this package. */ #undef PACKAGE_VERSION -/* Define to 1 if the C compiler supports function prototypes. */ +/* Define if compiler has function prototypes */ #undef PROTOTYPES /* Determine what socket length (socklen_t) data type is */ @@ -276,9 +276,6 @@ /* Using the Win32 Socket implementation */ #undef _WINSOCKAPI_ -/* Define like PROTOTYPES; this can be used by system headers. */ -#undef __PROTOTYPES - /* Win32 Std C name mangling work-around */ #undef snprintf diff --git a/parser.c b/parser.c index a5fd0114..6ee9159b 100644 --- a/parser.c +++ b/parser.c @@ -57,7 +57,10 @@ #ifdef LIBXML_CATALOG_ENABLED #include #endif - +#ifdef LIBXML_SCHEMAS_ENABLED +#include +#include +#endif #ifdef HAVE_CTYPE_H #include #endif 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; } diff --git a/tree.c b/tree.c index 134ce20a..805db669 100644 --- a/tree.c +++ b/tree.c @@ -37,6 +37,9 @@ #ifdef LIBXML_HTML_ENABLED #include #endif +#ifdef LIBXML_DEBUG_ENABLED +#include +#endif int __xmlRegisterCallbacks = 0;