/* Copyright (c) 2002-2018 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "buffer.h"
#include "charset-utf8-private.h"
#ifdef HAVE_ICONV
#include <iconv.h>
#include <ctype.h>
struct charset_translation {
};
static int
struct charset_translation **t_r)
{
struct charset_translation *t;
if (charset_is_utf8(charset))
else {
charset = "UTF-8";
return -1;
}
t->normalizer = normalizer;
*t_r = t;
return 0;
}
{
iconv_close(t->cd);
i_free(t);
}
{
}
static bool
enum charset_result *result)
{
/* input is already supposed to be UTF-8 */
return TRUE;
}
ic_destbuf = tmpbuf;
*result = CHARSET_RET_OK;
/* set result just to avoid compiler warning */
} else {
/* should be EILSEQ */
}
/* we just converted data to UTF-8. it shouldn't be invalid, but
Solaris iconv appears to pass invalid data through sometimes
(e.g. 8 bit characters with UTF-7) */
return ret;
}
static enum charset_result
{
bool ret;
for (pos = 0;;) {
if (ret)
break;
if (result == CHARSET_RET_INVALID_INPUT) {
}
pos++;
}
}
return result;
}
};
#endif