aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2005-02-28 12:51:26 +0800
committerMichael Zucci <zucchi@src.gnome.org>2005-02-28 12:51:26 +0800
commite9be19e60d982a874dae25c59df9a6b756b8ca7a (patch)
tree120111049265f675b9f5ccf36f20b22b99e25cee /mail
parente083da7520bd4cacaf1b19ff2d9483f39abe295f (diff)
downloadgsoc2013-evolution-e9be19e60d982a874dae25c59df9a6b756b8ca7a.tar
gsoc2013-evolution-e9be19e60d982a874dae25c59df9a6b756b8ca7a.tar.gz
gsoc2013-evolution-e9be19e60d982a874dae25c59df9a6b756b8ca7a.tar.bz2
gsoc2013-evolution-e9be19e60d982a874dae25c59df9a6b756b8ca7a.tar.lz
gsoc2013-evolution-e9be19e60d982a874dae25c59df9a6b756b8ca7a.tar.xz
gsoc2013-evolution-e9be19e60d982a874dae25c59df9a6b756b8ca7a.tar.zst
gsoc2013-evolution-e9be19e60d982a874dae25c59df9a6b756b8ca7a.zip
** See bug #72609
2005-02-24 Not Zed <NotZed@Ximian.com> ** See bug #72609 * em-inline-filter.c (emif_scan): try to convert the filename based on the incoming charset or the locale charset. This will make sure it is always valid. svn path=/trunk/; revision=28911
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog8
-rw-r--r--mail/em-inline-filter.c6
2 files changed, 13 insertions, 1 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index adad67a999..970013c0f8 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,11 @@
+2005-02-24 Not Zed <NotZed@Ximian.com>
+
+ ** See bug #72609
+
+ * em-inline-filter.c (emif_scan): try to convert the filename
+ based on the incoming charset or the locale charset. This will
+ make sure it is always valid.
+
2005-02-28 Not Zed <NotZed@Ximian.com>
* em-folder-browser.c: reverted Mengjie's patch for 72545.
diff --git a/mail/em-inline-filter.c b/mail/em-inline-filter.c
index 4b21cee46d..40da981d58 100644
--- a/mail/em-inline-filter.c
+++ b/mail/em-inline-filter.c
@@ -196,6 +196,7 @@ emif_scan(CamelMimeFilter *f, char *in, size_t len, int final)
if (strncmp(start, "begin ", 6) == 0
&& start[6] >= '0' && start[6] <= '7') {
int i = 7;
+ char *name;
while (start[i] >='0' && start[i] <='7')
i++;
@@ -206,7 +207,10 @@ emif_scan(CamelMimeFilter *f, char *in, size_t len, int final)
break;
emif_add_part(emif, data_start, start-data_start);
- emif->filename = g_strndup(start+i, inptr-start-i-1);
+
+ name = g_strndup(start+i, inptr-start-i-1);
+ emif->filename = camel_header_decode_string(name, emif->base_type?camel_content_type_param(emif->base_type, "charset"):NULL);
+ g_free(name);
data_start = start;
emif->state = EMIF_UUENC;
} else if (strncmp(start, "(This file must be converted with BinHex 4.0)", 45) == 0) {