X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;f=charset.c;h=921be697c528af615c7dffadf2c16548b34a55d6;hb=138805613145089d99d0c1bb24240d4d4b4d9e0b;hp=f9dcac9554104dfe7b5c9ebfce15d25c5a17dd03;hpb=2081560f3d3ccfad891a85e6893f2ed4e47901c2;p=checkmail.git diff --git a/charset.c b/charset.c index f9dcac9..921be69 100644 --- a/charset.c +++ b/charset.c @@ -199,7 +199,7 @@ static int rfc2047_decode_word (char *d, const char *s, size_t len) size_t dlen; if (convert_string (d0, strlen(d0), charset, system_charset, &dnew, &dlen) == (size_t) -1) { - debug("Charset conversion failure: <%s> from %s\n", d0, charset); + debug("Charset conversion failure: <%s> from %s (%m)\n", d0, charset); free (charset); free (d0); return (-1); @@ -383,6 +383,13 @@ charset_init(void) system_charset = nl_langinfo(CODESET); if (!system_charset[0]) system_charset = NULL; + if (system_charset) + { + /* FIXME: Use iconvctl() if available? */ + char *t = xmalloc(strlen(system_charset) + 11); + sprintf(t, "%s//TRANSLIT", system_charset); + system_charset = t; + } debug("Charset is %s\n", system_charset); }