-/* $Id: charmap.c,v 1.45 2007-05-25 13:46:01 adam Exp $
+/* $Id: charmap.c,v 1.46 2007-05-25 14:05:52 adam Exp $
Copyright (C) 1995-2007
Index Data ApS
else
{
ret = yaz_iconv(t, &inbuf, &inbytesleft, &outbuf, &outbytesleft);
+ if (ret != (size_t) (-1))
+ ret = yaz_iconv(t, 0, 0, &outbuf, &outbytesleft);
+
+
if (ret == (size_t) (-1))
{
yaz_log(YLOG_LOG, "from: %2X %2X %2X %2X",
size_t ret;
ret = yaz_iconv(t_unicode, &inbuf, &inbytesleft,
&outbuf, &outbytesleft);
+ if (ret != (size_t)(-1))
+ ret = yaz_iconv(t_unicode, 0, 0, &outbuf, &outbytesleft);
+
if (ret == (size_t)(-1))
return -1;
i = (outbuf - (char*) arg)/sizeof(ucs4_t);