aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--widgets/misc/ChangeLog7
-rw-r--r--widgets/misc/e-attachment-bar.c10
2 files changed, 13 insertions, 4 deletions
diff --git a/widgets/misc/ChangeLog b/widgets/misc/ChangeLog
index 5c91fc6a1f..bfc9fb24fe 100644
--- a/widgets/misc/ChangeLog
+++ b/widgets/misc/ChangeLog
@@ -1,3 +1,10 @@
+2006-03-06 Simon Zheng <simon.zheng@sun.com>
+
+ Fixes bug #332140
+ * e-attachment-bar.c: (temp_save_part):
+ Changed to transfer filenames from utf-8 to glib encoding
+ before really saving files.
+
2006-03-06 Jeff Cai <jeff.cai@sun.com>
** Fixes for 333235
diff --git a/widgets/misc/e-attachment-bar.c b/widgets/misc/e-attachment-bar.c
index 824e110746..7bf8de6844 100644
--- a/widgets/misc/e-attachment-bar.c
+++ b/widgets/misc/e-attachment-bar.c
@@ -671,7 +671,7 @@ static char *
temp_save_part(CamelMimePart *part)
{
const char *filename;
- char *tmpdir, *path, *mfilename = NULL;
+ char *tmpdir, *path, *mfilename = NULL, *utf8_mfilename = NULL;
CamelStream *stream;
CamelDataWrapper *wrapper;
@@ -685,9 +685,11 @@ temp_save_part(CamelMimePart *part)
/* This is the default filename used for temporary file creation */
filename = _("Unknown");
} else {
- mfilename = g_strdup(filename);
- e_filename_make_safe(mfilename);
- filename = mfilename;
+ utf8_mfilename = g_strdup (filename);
+ e_filename_make_safe (utf8_mfilename);
+ mfilename = g_filename_from_utf8 ((const char *) utf8_mfilename, -1, NULL, NULL, NULL);
+ g_free (utf8_mfilename);
+ filename = (const char *) mfilename;
}
path = g_build_filename(tmpdir, filename, NULL);