Paranoia.

SVN revision: 13878
This commit is contained in:
Kim Woelders 2005-03-23 19:40:56 +00:00
parent 697b209a65
commit 5cdc4733a5
1 changed files with 7 additions and 2 deletions

View File

@ -45,6 +45,11 @@ Eiconv(iconv_t icd, const char *txt, size_t len)
pi = (char *)txt;
po = buf;
ni = (len > 0) ? len : strlen(txt);
if (!icd)
{
Eprintf("*** WARNING - Missing conversion\n");
return Estrndup(txt, ni);
}
no = sizeof(buf);
err = iconv(icd, &pi, &ni, &po, &no);
@ -95,7 +100,7 @@ EstrInt2Enc(const char *str, int want_utf8)
{
#if HAVE_ICONV
if (Mode.text.utf8_int == want_utf8)
return (char *)str;
return str;
if (str == NULL)
return NULL;
@ -105,7 +110,7 @@ EstrInt2Enc(const char *str, int want_utf8)
return Eiconv(iconv_cd_int2loc, str, strlen(str));
#else
return (char *)str;
return str;
#endif
}