aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Zheng <simon.zheng@sun.com>2006-03-06 18:44:25 +0800
committerSimon Zheng <simonz@src.gnome.org>2006-03-06 18:44:25 +0800
commit1ad03dc11b01ce3df30fd141e50daed454c4967e (patch)
tree20795fc92783d05705ffeafe192dc2d51bb862f7
parentfad1b8ef5e21e42caf1d689452ec19a1cd77d999 (diff)
downloadgsoc2013-evolution-1ad03dc11b01ce3df30fd141e50daed454c4967e.tar.gz
gsoc2013-evolution-1ad03dc11b01ce3df30fd141e50daed454c4967e.tar.zst
gsoc2013-evolution-1ad03dc11b01ce3df30fd141e50daed454c4967e.zip
Fixes bug #332140 Transfer filenames from utf-8 to glib encoding before
2006-03-06 Simon Zheng <simon.zheng@sun.com> Fixes bug #332140 * em-utils.c: (em_utils_temp_save_part): Transfer filenames from utf-8 to glib encoding before really saving files. svn path=/trunk/; revision=31662
-rw-r--r--mail/ChangeLog7
-rw-r--r--mail/em-utils.c10
2 files changed, 13 insertions, 4 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index d5ebeccf36..592c8545a4 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,10 @@
+2006-03-06 Simon Zheng <simon.zheng@sun.com>
+
+ Fixes bug #332140
+ * em-utils.c: (em_utils_temp_save_part):
+ Transfer filenames from utf-8 to glib encoding before really
+ saving files.
+
2006-03-03 Andre Klapper <a9016009@gmx.de>
* configure.in,
diff --git a/mail/em-utils.c b/mail/em-utils.c
index cc0302fe59..13f66166ef 100644
--- a/mail/em-utils.c
+++ b/mail/em-utils.c
@@ -1259,7 +1259,7 @@ char *
em_utils_temp_save_part(GtkWidget *parent, CamelMimePart *part)
{
const char *filename;
- char *tmpdir, *path, *mfilename = NULL;
+ char *tmpdir, *path, *utf8_mfilename = NULL, *mfilename = NULL;
int done;
tmpdir = e_mkdtemp("evolution-tmp-XXXXXX");
@@ -1273,9 +1273,11 @@ em_utils_temp_save_part(GtkWidget *parent, 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);