aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc
diff options
context:
space:
mode:
authorSimon Zheng <simon.zheng@sun.com>2006-03-06 18:47:01 +0800
committerSimon Zheng <simonz@src.gnome.org>2006-03-06 18:47:01 +0800
commit1ff721e815ebf323d376b0b0dd50ecb9c9407f8f (patch)
tree983221c106e3fee4496bca88f6460909ee8a934c /widgets/misc
parent4ec70528ea81baa081b4ce41e25624958b14fc4b (diff)
downloadgsoc2013-evolution-1ff721e815ebf323d376b0b0dd50ecb9c9407f8f.tar.gz
gsoc2013-evolution-1ff721e815ebf323d376b0b0dd50ecb9c9407f8f.tar.zst
gsoc2013-evolution-1ff721e815ebf323d376b0b0dd50ecb9c9407f8f.zip
Fixes bug #332140 Changed to transfer filenames from utf-8 to glib
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. svn path=/trunk/; revision=31664
Diffstat (limited to 'widgets/misc')
-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);