diff options
-rw-r--r-- | em-format/em-format.c | 8 |
1 files changed, 7 insertions, 1 deletions
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 * |