fixed problem with detecting external dtd encoding (bug 135229). minor

* parser.c: fixed problem with detecting external dtd
  encoding (bug 135229).
* Makefile.am: minor change to test label
This commit is contained in:
William M. Brack 2004-04-16 15:58:29 +00:00
parent 5d8d10bba3
commit a0c48addfc
3 changed files with 12 additions and 2 deletions

View File

@ -1,3 +1,9 @@
Fri Apr 16 23:58:42 HKT 2004 William Brack <wbrack@mmm.com.hk>
* parser.c: fixed problem with detecting external dtd
encoding (bug 135229).
* Makefile.am: minor change to test label
Fri Apr 16 16:09:31 HKT 2004 William Brack <wbrack@mmm.com.hk>
* xinclude.c: fixed problem causing duplicate fallback

View File

@ -899,7 +899,7 @@ Relaxtests: xmllint$(EXEEXT)
diff $(srcdir)/result/relaxng/"$$name"_"$$xno".err \
err.$$name | grep -v "error detected at";\
fi ; grep Unimplemented err.$$name`; \
if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
if [ -n "$$log" ] ; then echo "$$name"_"$$xno" result ; echo $$log ; fi ; \
rm res.$$name err.$$name ; \
fi ; fi ; \
done; done)

View File

@ -1825,9 +1825,13 @@ xmlParserHandlePEReference(xmlParserCtxtPtr ctxt) {
* Get the 4 first bytes and decode the charset
* if enc != XML_CHAR_ENCODING_NONE
* plug some encoding conversion routines.
* Note that, since we may have some non-UTF8
* encoding (like UTF16, bug 135229), the 'length'
* is not known, but we can calculate based upon
* the amount of data in the buffer.
*/
GROW
if (entity->length >= 4) {
if ((ctxt->input->end - ctxt->input->cur)>=4) {
start[0] = RAW;
start[1] = NXT(1);
start[2] = NXT(2);