-/* $Id: charmap.c,v 1.45 2007-05-25 13:46:01 adam Exp $
- Copyright (C) 1995-2007
- Index Data ApS
-
-This file is part of the Zebra server.
+/* This file is part of the Zebra server.
+ Copyright (C) 1995-2008 Index Data
Zebra is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
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);