mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-03-09 04:58:16 +03:00
Change calls to xmlCharEncInput to set flush false when not final call. Having flush incorrectly set to true causes errors for ICU.
This commit is contained in:
parent
1637d612d1
commit
6e6ae5daa6
@ -3635,7 +3635,7 @@ htmlCheckEncodingDirect(htmlParserCtxtPtr ctxt, const xmlChar *encoding) {
|
||||
*/
|
||||
processed = ctxt->input->cur - ctxt->input->base;
|
||||
xmlBufShrink(ctxt->input->buf->buffer, processed);
|
||||
nbchars = xmlCharEncInput(ctxt->input->buf, 1);
|
||||
nbchars = xmlCharEncInput(ctxt->input->buf, 0);
|
||||
if (nbchars < 0) {
|
||||
htmlParseErr(ctxt, XML_ERR_INVALID_ENCODING,
|
||||
"htmlCheckEncoding: encoder error\n",
|
||||
|
@ -1214,7 +1214,7 @@ xmlSwitchInputEncodingInt(xmlParserCtxtPtr ctxt, xmlParserInputPtr input,
|
||||
/*
|
||||
* convert as much as possible of the buffer
|
||||
*/
|
||||
nbchars = xmlCharEncInput(input->buf, 1);
|
||||
nbchars = xmlCharEncInput(input->buf, 0);
|
||||
} else {
|
||||
/*
|
||||
* convert just enough to get
|
||||
|
4
xmlIO.c
4
xmlIO.c
@ -3157,7 +3157,7 @@ xmlParserInputBufferPush(xmlParserInputBufferPtr in,
|
||||
* convert as much as possible to the parser reading buffer.
|
||||
*/
|
||||
use = xmlBufUse(in->raw);
|
||||
nbchars = xmlCharEncInput(in, 1);
|
||||
nbchars = xmlCharEncInput(in, 0);
|
||||
if (nbchars < 0) {
|
||||
xmlIOErr(XML_IO_ENCODER, NULL);
|
||||
in->error = XML_IO_ENCODER;
|
||||
@ -3273,7 +3273,7 @@ xmlParserInputBufferGrow(xmlParserInputBufferPtr in, int len) {
|
||||
* convert as much as possible to the parser reading buffer.
|
||||
*/
|
||||
use = xmlBufUse(in->raw);
|
||||
nbchars = xmlCharEncInput(in, 1);
|
||||
nbchars = xmlCharEncInput(in, 0);
|
||||
if (nbchars < 0) {
|
||||
xmlIOErr(XML_IO_ENCODER, NULL);
|
||||
in->error = XML_IO_ENCODER;
|
||||
|
Loading…
x
Reference in New Issue
Block a user