Mercurial > gftp.yaz
changeset 569:6dcef47f3187
2004-9-27 Brian Masney <masneyb@gftp.org>
* lib/protocols.c (gftp_put_file) docs/gftp-faq.sgml - use
gftp_string_from_utf8() to encode the filename. This will use the
remote_charsets option instead of the GLIB environment variable
author | masneyb |
---|---|
date | Tue, 28 Sep 2004 01:58:54 +0000 |
parents | 3adfe34b1a77 |
children | 447f40a61ee8 |
files | ChangeLog docs/gftp-faq.sgml lib/protocols.c |
diffstat | 3 files changed, 9 insertions(+), 29 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Tue Sep 28 01:54:46 2004 +0000 +++ b/ChangeLog Tue Sep 28 01:58:54 2004 +0000 @@ -1,4 +1,8 @@ 2004-9-27 Brian Masney <masneyb@gftp.org> + * lib/protocols.c (gftp_put_file) docs/gftp-faq.sgml - use + gftp_string_from_utf8() to encode the filename. This will use the + remote_charsets option instead of the GLIB environment variable + * lib/protocols.c (gftp_string_from_utf8) - fixes for encoding the strings in the users' locale @@ -2866,7 +2870,7 @@ * cvsclean - added this script - * *.[ch] - added $Id: ChangeLog,v 1.330 2004/09/28 01:54:46 masneyb Exp $ tags + * *.[ch] - added $Id: ChangeLog,v 1.331 2004/09/28 01:58:54 masneyb Exp $ tags * debian/* - updated files from Debian maintainer
--- a/docs/gftp-faq.sgml Tue Sep 28 01:54:46 2004 +0000 +++ b/docs/gftp-faq.sgml Tue Sep 28 01:58:54 2004 +0000 @@ -6,7 +6,7 @@ <book> <bookinfo> - <date>$Date: 2004/09/28 01:39:50 $</date> + <date>$Date: 2004/09/28 01:58:54 $</date> <title>gFTP FAQ</title> <authorgroup> <author> @@ -279,19 +279,6 @@ <!-- ----------------------------------------------------------------- --> <sect1> -<title>Filenames are being stored in UTF8 instead of the current locale.</title> - -<para> -Starting with gFTP 2.0.18, you can use the GLIB environment variable -<emphasis>G_FILENAME_ENCODING</emphasis> to specify the encoding of the files -on your system. For more information about this environment variable, see -<ulink url="http://developer.gnome.org/doc/API/2.0/glib/glib-running.html#G_FILENAME_ENCODING">http://developer.gnome.org/doc/API/2.0/glib/glib-running.html#G_FILENAME_ENCODING</ulink>. -</para> -</sect1> - -<!-- ----------------------------------------------------------------- --> - -<sect1> <title>When using an external editor, gFTP does not detect changes that are being made to the file.</title> <para>
--- a/lib/protocols.c Tue Sep 28 01:54:46 2004 +0000 +++ b/lib/protocols.c Tue Sep 28 01:58:54 2004 +0000 @@ -187,9 +187,7 @@ gftp_put_file (gftp_request * request, const char *filename, int fd, off_t startsize, off_t totalsize) { - char *tempstr, *enc_filename; - gsize bread, bwrite; - GError * error; + char *enc_filename; int ret; g_return_val_if_fail (request != NULL, GFTP_EFATAL); @@ -198,17 +196,8 @@ if (request->put_file == NULL) return (GFTP_EFATAL); - if (g_utf8_validate (filename, -1, NULL)) - enc_filename = g_filename_from_utf8 (filename, -1, &bread, &bwrite, &error); - else - { - tempstr = gftp_string_to_utf8 (request, filename); - enc_filename = g_filename_from_utf8 (tempstr, -1, &bread, &bwrite, - &error); - g_free (tempstr); - } - - if (enc_filename) + enc_filename = gftp_string_from_utf8 (request, filename); + if (enc_filename != NULL) { ret = request->put_file (request, enc_filename, fd, startsize, totalsize); g_free (enc_filename);