diff options
author | Milan Crha <mcrha@redhat.com> | 2013-01-19 01:34:56 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2013-01-19 01:34:56 +0800 |
commit | 722a27e8507541e64ca2a436a7f10069b9e01223 (patch) | |
tree | eefaf16cd84524a8c3ee68ad4edd5937b8a16f1d /em-format | |
parent | 590b4711b78b94cac68a6c52e09a62628b5648d8 (diff) | |
download | gsoc2013-evolution-722a27e8507541e64ca2a436a7f10069b9e01223.tar gsoc2013-evolution-722a27e8507541e64ca2a436a7f10069b9e01223.tar.gz gsoc2013-evolution-722a27e8507541e64ca2a436a7f10069b9e01223.tar.bz2 gsoc2013-evolution-722a27e8507541e64ca2a436a7f10069b9e01223.tar.lz gsoc2013-evolution-722a27e8507541e64ca2a436a7f10069b9e01223.tar.xz gsoc2013-evolution-722a27e8507541e64ca2a436a7f10069b9e01223.tar.zst gsoc2013-evolution-722a27e8507541e64ca2a436a7f10069b9e01223.zip |
Bug #692005 - Changing character encoding doesn't work
Diffstat (limited to 'em-format')
-rw-r--r-- | em-format/e-mail-formatter-message-rfc822.c | 10 | ||||
-rw-r--r-- | em-format/e-mail-formatter-text-html.c | 10 | ||||
-rw-r--r-- | em-format/e-mail-formatter-text-plain.c | 10 |
3 files changed, 30 insertions, 0 deletions
diff --git a/em-format/e-mail-formatter-message-rfc822.c b/em-format/e-mail-formatter-message-rfc822.c index c0179ab848..9e88986e98 100644 --- a/em-format/e-mail-formatter-message-rfc822.c +++ b/em-format/e-mail-formatter-message-rfc822.c @@ -183,6 +183,7 @@ emfe_message_rfc822_format (EMailFormatterExtension *extension, EMailPart *p; CamelFolder *folder; const gchar *message_uid; + const gchar *default_charset, *charset; gchar *str; gchar *uri; @@ -192,12 +193,21 @@ emfe_message_rfc822_format (EMailFormatterExtension *extension, folder = e_mail_part_list_get_folder (context->part_list); message_uid = e_mail_part_list_get_message_uid (context->part_list); + default_charset = e_mail_formatter_get_default_charset (formatter); + charset = e_mail_formatter_get_charset (formatter); + + if (!default_charset) + default_charset = ""; + if (!charset) + charset = ""; uri = e_mail_part_build_uri ( folder, message_uid, "part_id", G_TYPE_STRING, p->id, "mode", G_TYPE_INT, E_MAIL_FORMATTER_MODE_RAW, "headers_collapsable", G_TYPE_INT, 0, + "formatter_default_charset", G_TYPE_STRING, default_charset, + "formatter_charset", G_TYPE_STRING, charset, NULL); str = g_strdup_printf ( diff --git a/em-format/e-mail-formatter-text-html.c b/em-format/e-mail-formatter-text-html.c index e32c48bab8..a70ec2b2f2 100644 --- a/em-format/e-mail-formatter-text-html.c +++ b/em-format/e-mail-formatter-text-html.c @@ -299,15 +299,25 @@ emfe_text_html_format (EMailFormatterExtension *extension, } else { CamelFolder *folder; const gchar *message_uid; + const gchar *default_charset, *charset; gchar *uri, *str; folder = e_mail_part_list_get_folder (context->part_list); message_uid = e_mail_part_list_get_message_uid (context->part_list); + default_charset = e_mail_formatter_get_default_charset (formatter); + charset = e_mail_formatter_get_charset (formatter); + + if (!default_charset) + default_charset = ""; + if (!charset) + charset = ""; uri = e_mail_part_build_uri ( folder, message_uid, "part_id", G_TYPE_STRING, part->id, "mode", G_TYPE_INT, E_MAIL_FORMATTER_MODE_RAW, + "formatter_default_charset", G_TYPE_STRING, default_charset, + "formatter_charset", G_TYPE_STRING, charset, NULL); str = g_strdup_printf ( diff --git a/em-format/e-mail-formatter-text-plain.c b/em-format/e-mail-formatter-text-plain.c index 3d0de8215c..278353b40b 100644 --- a/em-format/e-mail-formatter-text-plain.c +++ b/em-format/e-mail-formatter-text-plain.c @@ -135,14 +135,24 @@ emfe_text_plain_format (EMailFormatterExtension *extension, CamelFolder *folder; const gchar *message_uid; gchar *uri, *str; + const gchar *default_charset, *charset; folder = e_mail_part_list_get_folder (context->part_list); message_uid = e_mail_part_list_get_message_uid (context->part_list); + default_charset = e_mail_formatter_get_default_charset (formatter); + charset = e_mail_formatter_get_charset (formatter); + + if (!default_charset) + default_charset = ""; + if (!charset) + charset = ""; uri = e_mail_part_build_uri ( folder, message_uid, "part_id", G_TYPE_STRING, part->id, "mode", G_TYPE_INT, E_MAIL_FORMATTER_MODE_RAW, + "formatter_default_charset", G_TYPE_STRING, default_charset, + "formatter_charset", G_TYPE_STRING, charset, NULL); str = g_strdup_printf ( |