mirror of
https://git.notmuchmail.org/git/notmuch
synced 2024-11-24 20:08:10 +01:00
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>
This commit is contained in:
parent
0ca1611416
commit
c8b50eee28
1 changed files with 6 additions and 0 deletions
|
@ -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));
|
||||
|
|
Loading…
Reference in a new issue