From 4ec70528ea81baa081b4ce41e25624958b14fc4b Mon Sep 17 00:00:00 2001 From: Simon Zheng Date: Mon, 6 Mar 2006 10:45:57 +0000 Subject: Fixes bug #332140 2006-03-06 Simon Zheng 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 --- calendar/gui/dialogs/comp-editor.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'calendar/gui/dialogs/comp-editor.c') diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c index cc19b006f8..f6fa0e9730 100644 --- a/calendar/gui/dialogs/comp-editor.c +++ b/calendar/gui/dialogs/comp-editor.c @@ -634,7 +634,7 @@ get_attachment_list (CompEditor *editor) CamelDataWrapper *wrapper; CamelStream *stream; char *attach_file_url; - char *safe_fname; + char *safe_fname, *utf8_safe_fname; char *filename; wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (p->data)); @@ -642,7 +642,9 @@ get_attachment_list (CompEditor *editor) /* Extract the content from the stream and write it down * as a mime part file into the directory denoting the * calendar source */ - safe_fname = camel_file_util_safe_filename(camel_mime_part_get_filename ((CamelMimePart *)p->data)); + utf8_safe_fname = camel_file_util_safe_filename (camel_mime_part_get_filename ((CamelMimePart *) p->data)); + safe_fname = g_filename_from_utf8 ((const char *) utf8_safe_fname, -1, NULL, NULL, NULL); + g_free (utf8_safe_fname); filename = g_strdup_printf ("%s-%s", comp_uid, safe_fname); -- cgit v1.2.3