diff options
author | Simon Zheng <simon.zheng@sun.com> | 2006-03-06 18:47:01 +0800 |
---|---|---|
committer | Simon Zheng <simonz@src.gnome.org> | 2006-03-06 18:47:01 +0800 |
commit | 1ff721e815ebf323d376b0b0dd50ecb9c9407f8f (patch) | |
tree | 983221c106e3fee4496bca88f6460909ee8a934c | |
parent | 4ec70528ea81baa081b4ce41e25624958b14fc4b (diff) | |
download | gsoc2013-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
-rw-r--r-- | widgets/misc/ChangeLog | 7 | ||||
-rw-r--r-- | widgets/misc/e-attachment-bar.c | 10 |
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); |