aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-utils.c
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 /mail/em-utils.c
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
Diffstat (limited to 'mail/em-utils.c')
-rw-r--r--mail/em-utils.c10
1 files changed, 6 insertions, 4 deletions
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);
beat2009-02-202-3/+4 * - Update portversion to 1.7beech2009-02-021-1/+1 * - Update to 1.6miwi2008-08-122-4/+4 * - Update to 1.4miwi2008-02-012-4/+4 * A toolbox providing programming facilities for LaTeX.miwi2008-01-21