1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-29 11:41:22 +03:00

don't override existing encoding specified before starting

* parser.c: don't override existing encoding specified before
  starting xmlParseDocument()
Daniel
This commit is contained in:
Daniel Veillard
2001-07-28 17:21:12 +00:00
parent fdb1f24420
commit 4aafa79013
2 changed files with 19 additions and 12 deletions

View File

@ -1,3 +1,8 @@
Sun Jul 29 07:18:53 EDT 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
* parser.c: don't override existing encoding specified before
starting xmlParseDocument()
Sat Jul 28 13:33:10 EDT 2001 Daniel Veillard <Daniel.Veillard@imag.fr>
* include/libxml/xmlwin32version.h: reinserted, needed for

View File

@ -7297,6 +7297,7 @@ xmlParseDocument(xmlParserCtxtPtr ctxt) {
if ((ctxt->sax) && (ctxt->sax->setDocumentLocator))
ctxt->sax->setDocumentLocator(ctxt->userData, &xmlDefaultSAXLocator);
if (ctxt->encoding == XML_CHAR_ENCODING_NONE) {
/*
* Get the 4 first bytes and decode the charset
* if enc != XML_CHAR_ENCODING_NONE
@ -7310,6 +7311,7 @@ xmlParseDocument(xmlParserCtxtPtr ctxt) {
if (enc != XML_CHAR_ENCODING_NONE) {
xmlSwitchEncoding(ctxt, enc);
}
}
if (CUR == 0) {