X-Git-Url: http://git.madism.org/?a=blobdiff_plain;f=imap%2Futf7.c;h=d1419e379778a73c894125ef5d00bdd6c26d3ca2;hb=230399f9632c37b66c1c117a17e8327eae6b3235;hp=e2b3340198876a8dcaa3c3ced5b242b6149dad2b;hpb=bec523bb3ad78ec9100efb18fb58d43d38b304de;p=apps%2Fmadmutt.git diff --git a/imap/utf7.c b/imap/utf7.c index e2b3340..d1419e3 100644 --- a/imap/utf7.c +++ b/imap/utf7.c @@ -11,7 +11,7 @@ # include "config.h" #endif -#include +#include #include "mutt.h" #include "charset.h" @@ -111,8 +111,8 @@ bail: * Unicode characters above U+FFFF are replaced by U+FFFE. * If input data is invalid, return 0 and don't store anything. */ -static char *utf8_to_utf7 (const char *u8, size_t u8len, char **u7, - size_t * u7len) +static char *utf8_to_utf7 (const char *u8, ssize_t u8len, char **u7, + ssize_t * u7len) { char *buf, *p; int ch; @@ -215,7 +215,7 @@ void imap_utf7_encode (char **s) if (Charset) { char *t = m_strdup(*s); - if (!mutt_convert_string (&t, Charset, "UTF-8", 0)) { + if (!mutt_convert_string (&t, Charset, "utf-8", 0)) { char *u7 = utf8_to_utf7 (t, strlen (t), NULL, 0); p_delete(s); *s = u7; @@ -229,7 +229,7 @@ void imap_utf7_decode (char **s) if (Charset) { char *t = utf7_to_utf8 (*s, m_strlen(*s), 0, 0); - if (t && !mutt_convert_string (&t, "UTF-8", Charset, 0)) { + if (t && !mutt_convert_string (&t, "utf-8", Charset, 0)) { p_delete(s); *s = t; }