Fix dup'ed identifers for MARC-8 encoding YAZ-650
authorAdam Dickmeiss <adam@indexdata.dk>
Wed, 10 Apr 2013 08:49:11 +0000 (10:49 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Wed, 10 Apr 2013 08:50:28 +0000 (10:50 +0200)
The problem was that cdata_one_character did not fully flush the
output and so that would be carried over to the "real" output.

src/marcdisp.c

index b5ef643..ff4c97e 100644 (file)
@@ -463,6 +463,7 @@ static size_t cdata_one_character(yaz_marc_t mt, const char *buf)
             size_t inbytesleft = i;
             size_t r = yaz_iconv(mt->iconv_cd, (char**) &inp, &inbytesleft,
                                  &outp, &outbytesleft);
+            yaz_iconv(mt->iconv_cd, 0, 0, &outp, &outbytesleft);
             if (r != (size_t) (-1))
                 return i;  /* got a complete sequence */
         }