diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2014-09-02 13:34:01 +0400 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2014-09-02 13:34:01 +0400 |
commit | fa06cf6edf86aa1839d4f43bfd3bd9a3a36b5223 (patch) | |
tree | 705466443ec58fffa74a3499a3bcc56be1cdee9d /encoding.c | |
parent | 08f466c86ef859f2f3ab1f65677536cbccd85960 (diff) | |
parent | 3a8c2d58eab0410fe5e79a112614aa9be061dc46 (diff) | |
download | libxml2-fa06cf6edf86aa1839d4f43bfd3bd9a3a36b5223.tar.gz |
Merge branch 'master' of git://anonscm.debian.org/debian-xml-sgml/libxml2
Conflicts:
debian/changelog
debian/control
debian/rules
Diffstat (limited to 'encoding.c')
-rw-r--r-- | encoding.c | 9 |
1 files changed, 6 insertions, 3 deletions
@@ -1517,6 +1517,8 @@ xmlGetCharEncodingHandler(xmlCharEncoding enc) { if (handler != NULL) return(handler); handler = xmlFindCharEncodingHandler("EBCDIC-US"); if (handler != NULL) return(handler); + handler = xmlFindCharEncodingHandler("IBM-037"); + if (handler != NULL) return(handler); break; case XML_CHAR_ENCODING_UCS4BE: handler = xmlFindCharEncodingHandler("ISO-10646-UCS-4"); @@ -2161,6 +2163,7 @@ xmlCharEncFirstLineInput(xmlParserInputBufferPtr input, int len) /** * xmlCharEncInput: * @input: a parser input buffer + * @flush: try to flush all the raw buffer * * Generic front-end for the encoding handler on parser input * @@ -2170,7 +2173,7 @@ xmlCharEncFirstLineInput(xmlParserInputBufferPtr input, int len) * the result of transformation can't fit into the encoding we want), or */ int -xmlCharEncInput(xmlParserInputBufferPtr input) +xmlCharEncInput(xmlParserInputBufferPtr input, int flush) { int ret = -2; size_t written; @@ -2189,7 +2192,7 @@ xmlCharEncInput(xmlParserInputBufferPtr input) toconv = xmlBufUse(in); if (toconv == 0) return (0); - if (toconv > 64 * 1024) + if ((toconv > 64 * 1024) && (flush == 0)) toconv = 64 * 1024; written = xmlBufAvail(out); if (written > 0) @@ -2200,7 +2203,7 @@ xmlCharEncInput(xmlParserInputBufferPtr input) if (written > 0) written--; /* count '\0' */ } - if (written > 128 * 1024) + if ((written > 128 * 1024) && (flush == 0)) written = 128 * 1024; c_in = toconv; |