aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-cal-popup.c
diff options
context:
space:
mode:
authorSimon Zheng <simon.zheng@sun.com>2006-03-06 18:45:57 +0800
committerSimon Zheng <simonz@src.gnome.org>2006-03-06 18:45:57 +0800
commit4ec70528ea81baa081b4ce41e25624958b14fc4b (patch)
tree778af9d9ff960d25d3d3818f4dc932b0db4273f5 /calendar/gui/e-cal-popup.c
parent1ad03dc11b01ce3df30fd141e50daed454c4967e (diff)
downloadgsoc2013-evolution-4ec70528ea81baa081b4ce41e25624958b14fc4b.tar.gz
gsoc2013-evolution-4ec70528ea81baa081b4ce41e25624958b14fc4b.tar.zst
gsoc2013-evolution-4ec70528ea81baa081b4ce41e25624958b14fc4b.zip
Fixes bug #332140
2006-03-06 Simon Zheng <simon.zheng@sun.com> Fixes bug #332140 * gui/dialogs/comp-editor.c: (get_attachment_list): * gui/e-cal-popup.c: (temp_save_part): Transfer filenames from utf-8 to glib encoding before really saving files. svn path=/trunk/; revision=31663
Diffstat (limited to 'calendar/gui/e-cal-popup.c')
-rw-r--r--calendar/gui/e-cal-popup.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/calendar/gui/e-cal-popup.c b/calendar/gui/e-cal-popup.c
index c4cc57ee9c..7e1d1ca040 100644
--- a/calendar/gui/e-cal-popup.c
+++ b/calendar/gui/e-cal-popup.c
@@ -91,7 +91,7 @@ static char *
temp_save_part(CamelMimePart *part, char *path, gboolean file)
{
const char *filename;
- char *tmpdir, *mfilename = NULL;
+ char *tmpdir, *utf8_mfilename = NULL, *mfilename = NULL;
CamelStream *stream;
CamelDataWrapper *wrapper;
@@ -106,9 +106,11 @@ temp_save_part(CamelMimePart *part, char *path, gboolean file)
/* 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);
@@ -121,9 +123,11 @@ temp_save_part(CamelMimePart *part, char *path, gboolean file)
/* 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);