projects
/
idzebra-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed magic NS for DOM XML indexing.
[idzebra-moved-to-github.git]
/
util
/
charmap.c
diff --git
a/util/charmap.c
b/util/charmap.c
index
85c9239
..
2ca7af1
100644
(file)
--- a/
util/charmap.c
+++ b/
util/charmap.c
@@
-1,4
+1,4
@@
-/* $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
Copyright (C) 1995-2007
Index Data ApS
@@
-420,6
+420,10
@@
static int scan_to_utf8(yaz_iconv_t t, ucs4_t *from, size_t inlen,
else
{
ret = yaz_iconv(t, &inbuf, &inbytesleft, &outbuf, &outbytesleft);
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",
if (ret == (size_t) (-1))
{
yaz_log(YLOG_LOG, "from: %2X %2X %2X %2X",
@@
-454,6
+458,9
@@
static int scan_string(char *s_native,
size_t ret;
ret = yaz_iconv(t_unicode, &inbuf, &inbytesleft,
&outbuf, &outbytesleft);
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);
if (ret == (size_t)(-1))
return -1;
i = (outbuf - (char*) arg)/sizeof(ucs4_t);