Skip to content

Commit

Permalink
fixed to skip (if necessary) the BOM for encoding 'utf-16'. Completes…
Browse files Browse the repository at this point in the history
… 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
  • Loading branch information
William M. Brack committed Dec 25, 2004
1 parent ff34911 commit 1d8c9b2
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 6 deletions.
6 changes: 6 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
Sat Dec 25 18:10:02 HKT 2004 William Brack <[email protected]>

* 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 <[email protected]>

* python/generator.py: added most required entires to
Expand Down
5 changes: 1 addition & 4 deletions config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand All @@ -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

Expand Down
5 changes: 4 additions & 1 deletion parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion parserInternals.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
3 changes: 3 additions & 0 deletions tree.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 1d8c9b2

Please sign in to comment.