[libxml2] 630140 better fix for iso995x encoding error
- From: Daniel Veillard <veillard src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libxml2] 630140 better fix for iso995x encoding error
- Date: Wed, 3 Nov 2010 19:48:25 +0000 (UTC)
commit ad4f0a2dc893cb01af35361c0349227fd6c765b5
Author: Daniel Veillard <veillard redhat com>
Date: Wed Nov 3 20:40:46 2010 +0100
630140 better fix for iso995x encoding error
Changing semantic of xmlCharEncInFunc() wasn't the proper way to
do this, better change UTF8ToISO8859x() appropriately
encoding.c | 10 +++-------
1 files changed, 3 insertions(+), 7 deletions(-)
---
diff --git a/encoding.c b/encoding.c
index 698b8d7..a68cf21 100644
--- a/encoding.c
+++ b/encoding.c
@@ -2039,11 +2039,7 @@ retry:
xmlBufferShrink(in, toconv);
out->use += written;
writtentot += written;
- /* multichar cut at end of buffer can generate that problem */
- if (ret == -2) {
- ret = -3;
- }
- }
+ }
out->content[out->use] = 0;
}
#ifdef LIBXML_ICONV_ENABLED
@@ -2319,7 +2315,7 @@ UTF8ToISO8859x(unsigned char* out, int *outlen,
/* trailing byte not in input buffer */
*outlen = out - outstart;
*inlen = processed - instart;
- return(-2);
+ return(-3);
}
c = *in++;
if ((c & 0xC0) != 0x80) {
@@ -2345,7 +2341,7 @@ UTF8ToISO8859x(unsigned char* out, int *outlen,
/* trailing bytes not in input buffer */
*outlen = out - outstart;
*inlen = processed - instart;
- return(-2);
+ return(-3);
}
c1 = *in++;
if ((c1 & 0xC0) != 0x80) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]