[dovecot-cvs] dovecot/src/lib-charset charset-iconv.c,1.19,1.20
tss at dovecot.org
tss at dovecot.org
Tue Apr 3 13:13:12 EEST 2007
Update of /var/lib/cvs/dovecot/src/lib-charset
In directory talvi:/tmp/cvs-serv25170
Modified Files:
charset-iconv.c
Log Message:
Cleanup
Index: charset-iconv.c
===================================================================
RCS file: /var/lib/cvs/dovecot/src/lib-charset/charset-iconv.c,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- charset-iconv.c 16 Sep 2006 13:50:21 -0000 1.19
+++ charset-iconv.c 3 Apr 2007 10:13:10 -0000 1.20
@@ -11,7 +11,6 @@
struct charset_translation {
iconv_t cd;
- bool ascii;
};
struct charset_translation *charset_to_utf8_begin(const char *charset,
@@ -19,21 +18,13 @@
{
struct charset_translation *t;
iconv_t cd;
- bool ascii;
if (unknown_charset != NULL)
*unknown_charset = FALSE;
- if (strcasecmp(charset, "us-ascii") == 0 ||
- strcasecmp(charset, "ascii") == 0) {
- cd = (iconv_t)-1;
- ascii = TRUE;
- } else if (strcasecmp(charset, "UTF-8") == 0 ||
- strcasecmp(charset, "UTF8") == 0) {
+ if (charset_is_utf8(charset))
cd = (iconv_t)-1;
- ascii = FALSE;
- } else {
- ascii = FALSE;
+ else {
cd = iconv_open("UTF-8", charset);
if (cd == (iconv_t)-1) {
if (unknown_charset != NULL)
@@ -44,7 +35,6 @@
t = i_new(struct charset_translation, 1);
t->cd = cd;
- t->ascii = ascii;
return t;
}
More information about the dovecot-cvs
mailing list