StrBuf StaticBuf;
char charset[128];
char encoding[16];
+#ifdef HAVE_ICONV
iconv_t ic = (iconv_t)(-1);
-
+#endif
/* Now we handle foreign character sets properly encoded
* in RFC2047 format.
*/
else {
StrBufAppendBuf(ConvertBuf2, ConvertBuf, 0);
}
-
+#ifdef HAVE_ICONV
ctdl_iconv_open("UTF-8", charset, &ic);
if (ic != (iconv_t)(-1) ) {
+#endif
StrBufConvert(ConvertBuf2, ConvertBuf, &ic);
StrBufAppendBuf(Target, ConvertBuf2, 0);
+#ifdef HAVE_ICONV
iconv_close(ic);
}
else {
StrBufAppendBufPlain(Target, HKEY("(unreadable)"), 0);
}
+#endif
}
/*
* Handle subjects with RFC2047 encoding such as:
{
StrBuf *ConvertBuf, *ConvertBuf2;
char *start, *end, *next, *nextend, *ptr = NULL;
+#ifdef HAVE_ICONV
iconv_t ic = (iconv_t)(-1) ;
+#endif
const char *eptr;
int passes = 0;
int i, len, delta;
(strcasecmp(ChrPtr(DefaultCharset), "UTF-8")) &&
(strcasecmp(ChrPtr(DefaultCharset), "us-ascii")) )
{
+#ifdef HAVE_ICONV
ctdl_iconv_open("UTF-8", ChrPtr(DefaultCharset), &ic);
if (ic != (iconv_t)(-1) ) {
StrBufConvert((StrBuf*)DecodeMe, ConvertBuf, &ic);///TODO: don't void const?
iconv_close(ic);
}
+#endif
}
/* pre evaluate the first pair */