1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-02-05 05:47:00 +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

@ -1,3 +1,9 @@
Sat Dec 25 18:10:02 HKT 2004 William Brack <wbrack@mmm.com.hk>
* 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 <wbrack@mmm.com.hk>
* python/generator.py: added most required entires to

View File

@ -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

View File

@ -57,7 +57,10 @@
#ifdef LIBXML_CATALOG_ENABLED
#include <libxml/catalog.h>
#endif
#ifdef LIBXML_SCHEMAS_ENABLED
#include <libxml/xmlschemastypes.h>
#include <libxml/relaxng.h>
#endif
#ifdef HAVE_CTYPE_H
#include <ctype.h>
#endif

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;
}

3
tree.c
View File

@ -37,6 +37,9 @@
#ifdef LIBXML_HTML_ENABLED
#include <libxml/HTMLtree.h>
#endif
#ifdef LIBXML_DEBUG_ENABLED
#include <libxml/debugXML.h>
#endif
int __xmlRegisterCallbacks = 0;