diff options
author | Kan-Ru Chen <kanru@kanru.info> | 2009-11-28 19:58:29 +0800 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2009-12-03 16:47:47 -0800 |
commit | c8b50eee284ff880aed955018568a14eff03d129 (patch) | |
tree | f0925ecc9e5da3869587b192ba5f3a0d70d7b9e2 /notmuch-reply.c | |
parent | 0ca16114162f94424cb75f01c84334a17ac43f98 (diff) |
notmuch-reply: Display reply message part using UTF-8.
Pass the message through the charset filter so that we can view
messages wrote in different charset encoding.
Signed-off-by: Kan-Ru Chen <kanru@kanru.info>
Diffstat (limited to 'notmuch-reply.c')
-rw-r--r-- | notmuch-reply.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/notmuch-reply.c b/notmuch-reply.c index 9ca1236..0cda72d 100644 --- a/notmuch-reply.c +++ b/notmuch-reply.c @@ -39,11 +39,17 @@ reply_part_content (GMimeObject *part) { GMimeStream *stream_stdout = NULL, *stream_filter = NULL; GMimeDataWrapper *wrapper; + const char *charset; + charset = g_mime_object_get_content_type_parameter (part, "charset"); stream_stdout = g_mime_stream_file_new (stdout); if (stream_stdout) { g_mime_stream_file_set_owner (GMIME_STREAM_FILE (stream_stdout), FALSE); stream_filter = g_mime_stream_filter_new(stream_stdout); + if (charset) { + g_mime_stream_filter_add(GMIME_STREAM_FILTER(stream_filter), + g_mime_filter_charset_new(charset, "UTF-8")); + } } g_mime_stream_filter_add(GMIME_STREAM_FILTER(stream_filter), g_mime_filter_reply_new(TRUE)); |