X-Git-Url: https://git.notmuchmail.org/git?p=notmuch;a=blobdiff_plain;f=notmuch-show.c;h=edebacaa571a3ba44a089fa671300e71f8c530cb;hp=d727f302d2f09324dc5dc7d30681d6dc0fb236ef;hb=c57a0b4f8b78d655b90f4f2e6f986c85f477aef7;hpb=637f99d8f3f45867d0a856503f9f302333824c07 diff --git a/notmuch-show.c b/notmuch-show.c index d727f302..edebacaa 100644 --- a/notmuch-show.c +++ b/notmuch-show.c @@ -72,12 +72,19 @@ show_part_content (GMimeObject *part) GMimeStream *stream_stdout = g_mime_stream_file_new (stdout); GMimeStream *stream_filter = NULL; GMimeDataWrapper *wrapper; + const char *charset; + + charset = g_mime_object_get_content_type_parameter (part, "charset"); if (stream_stdout) { g_mime_stream_file_set_owner (GMIME_STREAM_FILE (stream_stdout), FALSE); stream_filter = g_mime_stream_filter_new(stream_stdout); g_mime_stream_filter_add(GMIME_STREAM_FILTER(stream_filter), g_mime_filter_crlf_new(FALSE, FALSE)); + if (charset) { + g_mime_stream_filter_add(GMIME_STREAM_FILTER(stream_filter), + g_mime_filter_charset_new(charset, "UTF-8")); + } } wrapper = g_mime_part_get_content_object (GMIME_PART (part)); @@ -231,7 +238,7 @@ notmuch_show_command (void *ctx, unused (int argc), unused (char *argv[])) return 1; } - for (threads = notmuch_query_search_threads (query, 0, -1); + for (threads = notmuch_query_search_threads (query); notmuch_threads_has_more (threads); notmuch_threads_advance (threads)) {