Permalink
Browse files

630140 better fix for iso995x encoding error

Changing semantic of xmlCharEncInFunc() wasn't the proper way to
do this, better change UTF8ToISO8859x() appropriately
  • Loading branch information...
1 parent 1cc912e commit ad4f0a2dc893cb01af35361c0349227fd6c765b5 @veillard veillard committed Nov 3, 2010
Showing with 3 additions and 7 deletions.
  1. +3 −7 encoding.c
View
@@ -2039,11 +2039,7 @@ xmlCharEncOutFunc(xmlCharEncodingHandler *handler, xmlBufferPtr out,
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) {

0 comments on commit ad4f0a2

Please sign in to comment.