summaryrefslogtreecommitdiffstats
path: root/rfc2047.c
diff options
context:
space:
mode:
authorThomas Roessler <roessler@does-not-exist.org>1998-09-15 20:53:17 +0000
committerThomas Roessler <roessler@does-not-exist.org>1998-09-15 20:53:17 +0000
commit7440bfe68f6e152b40a308dd010188e57a9ae65a (patch)
treec73e134c8c934a131e646fac9c33e5c5354da7a8 /rfc2047.c
parent8f42140d643a16ebe27cea943bd8c7bf02d30c9b (diff)
Adding basic UTF-8 support.
Diffstat (limited to 'rfc2047.c')
-rw-r--r--rfc2047.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/rfc2047.c b/rfc2047.c
index 3bfaafb7..87745bd8 100644
--- a/rfc2047.c
+++ b/rfc2047.c
@@ -324,16 +324,20 @@ static int rfc2047_decode_word (char *d, const char *s, size_t len)
}
pp = 0;
}
+
if (filter)
{
- if (mutt_display_string(d, mutt_get_translation(charset, Charset)) == -1)
+ if(mutt_is_utf8(charset))
+ {
+ CHARSET *chs = mutt_get_charset(Charset);
+ mutt_decode_utf8_string(d, chs);
+ }
+ else if (mutt_display_string(d, mutt_get_translation(charset, Charset)) == -1)
{
- pd = d;
- while (*pd)
+ for(pd = d; *pd; pd++)
{
if (!IsPrint (*pd))
*pd = '?';
- pd++;
}
}
}