aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2003-03-22 05:26:06 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2003-03-22 05:26:06 +0800
commitd7a4a66632cac7424bc158ace966b9ac950f4337 (patch)
tree4ca7b19bb644230193db80dfb6d49453abdbb243 /mail
parent18b70fa27b0e1ed213617b50af09ca5435cd3e26 (diff)
downloadgsoc2013-evolution-d7a4a66632cac7424bc158ace966b9ac950f4337.tar
gsoc2013-evolution-d7a4a66632cac7424bc158ace966b9ac950f4337.tar.gz
gsoc2013-evolution-d7a4a66632cac7424bc158ace966b9ac950f4337.tar.bz2
gsoc2013-evolution-d7a4a66632cac7424bc158ace966b9ac950f4337.tar.lz
gsoc2013-evolution-d7a4a66632cac7424bc158ace966b9ac950f4337.tar.xz
gsoc2013-evolution-d7a4a66632cac7424bc158ace966b9ac950f4337.tar.zst
gsoc2013-evolution-d7a4a66632cac7424bc158ace966b9ac950f4337.zip
Default to the charset provied in the MimePart's Content-Type over that of
2003-03-21 Jeffrey Stedfast <fejj@ximian.com> * mail-format.c (mail_format_data_wrapper_write_to_stream): Default to the charset provied in the MimePart's Content-Type over that of the user's mailer charset. Fixes bug #39204. svn path=/trunk/; revision=20462
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog6
-rw-r--r--mail/mail-format.c7
2 files changed, 11 insertions, 2 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 1da0a85eed..3fb203c98b 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,11 @@
2003-03-21 Jeffrey Stedfast <fejj@ximian.com>
+ * mail-format.c (mail_format_data_wrapper_write_to_stream):
+ Default to the charset provied in the MimePart's Content-Type over
+ that of the user's mailer charset. Fixes bug #39204.
+
+2003-03-21 Jeffrey Stedfast <fejj@ximian.com>
+
* mail-composer-prefs.c (spell_load_values): "en_us" should not be
translated. Fixes bug #40088.
diff --git a/mail/mail-format.c b/mail/mail-format.c
index 9d4423c1af..562776da16 100644
--- a/mail/mail-format.c
+++ b/mail/mail-format.c
@@ -1099,19 +1099,20 @@ mail_format_data_wrapper_write_to_stream (CamelDataWrapper *wrapper, MailDisplay
if (wrapper->rawtext || (mail_display && mail_display->charset)) {
CamelMimeFilterCharset *filter;
+ CamelContentType *content_type;
GConfClient *gconf;
char *charset;
gconf = gconf_client_get_default ();
+ content_type = camel_data_wrapper_get_mime_type_field (wrapper);
+
if (!wrapper->rawtext) {
/* data wrapper had been successfully converted to UTF-8 using the mime
part's charset, but the user thinks he knows best so we'll let him
shoot himself in the foot here... */
- CamelContentType *content_type;
/* get the original charset of the mime part */
- content_type = camel_data_wrapper_get_mime_type_field (wrapper);
charset = (char *) (content_type ? header_content_type_param (content_type, "charset") : NULL);
if (!charset)
charset = gconf_client_get_string (gconf, "/apps/evolution/mail/format/charset", NULL);
@@ -1132,6 +1133,8 @@ mail_format_data_wrapper_write_to_stream (CamelDataWrapper *wrapper, MailDisplay
/* find out the charset the user wants to override to */
if (mail_display && mail_display->charset)
charset = g_strdup (mail_display->charset);
+ else if (content_type && (charset = (char *) header_content_type_param (content_type, "charset")))
+ charset = g_strdup (charset);
else
charset = gconf_client_get_string (gconf, "/apps/evolution/mail/format/charset", NULL);