From 3cce397e3e7bde2e7bcb55d15405a160756a7a66 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Fri, 4 May 2012 12:03:53 +0200 Subject: Bug #669111 - Lost charset in replies to encrypted mails --- em-format/em-format.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/em-format/em-format.c b/em-format/em-format.c index becd43f3f7..6b08705d86 100644 --- a/em-format/em-format.c +++ b/em-format/em-format.c @@ -135,8 +135,14 @@ preserve_charset_in_content_type (CamelMimePart *ipart, data_wrapper = camel_medium_get_content (CAMEL_MEDIUM (opart)); content_type = camel_data_wrapper_get_mime_type_field (data_wrapper); + if (content_type) + camel_content_type_set_param (content_type, "charset", charset); - camel_content_type_set_param (content_type, "charset", charset); + /* update charset also on the part itself */ + data_wrapper = CAMEL_DATA_WRAPPER (opart); + content_type = camel_data_wrapper_get_mime_type_field (data_wrapper); + if (content_type) + camel_content_type_set_param (content_type, "charset", charset); } static CamelMimePart * -- cgit v1.2.3