changeset 578:6451504bed0b

2004-10-2 Brian Masney <masneyb@gftp.org> * lib/protocols.c (gftp_parse_bookmark) - convert the local and remote directories from UTF8 to the current locale specified in the remote_charsets option
author masneyb
date Sat, 02 Oct 2004 12:59:49 +0000
parents ebfc69afec39
children 5dc685bf403e
files ChangeLog lib/protocols.c
diffstat 2 files changed, 26 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Fri Oct 01 13:31:12 2004 +0000
+++ b/ChangeLog	Sat Oct 02 12:59:49 2004 +0000
@@ -1,3 +1,8 @@
+2004-10-2 Brian Masney <masneyb@gftp.org>
+	* lib/protocols.c (gftp_parse_bookmark) - convert the local and remote
+	directories from UTF8 to the current locale specified in the
+	remote_charsets option
+
 2004-9-29 Brian Masney <masneyb@gftp.org>
 	* configure.in - removed intl/Makefile po/Makefile.in from AC_OUTPUT
 	since automake will add these
@@ -2911,7 +2916,7 @@
 
 	* cvsclean - added this script
 
-	* *.[ch] - added $Id: ChangeLog,v 1.338 2004/09/29 23:29:31 masneyb Exp $ tags
+	* *.[ch] - added $Id: ChangeLog,v 1.339 2004/10/02 12:59:49 masneyb Exp $ tags
 
 	* debian/* - updated files from Debian maintainer
 
--- a/lib/protocols.c	Fri Oct 01 13:31:12 2004 +0000
+++ b/lib/protocols.c	Sat Oct 02 12:59:49 2004 +0000
@@ -613,7 +613,7 @@
 {
   gftp_logging_func logging_function;
   gftp_bookmarks_var * tempentry;
-  char *default_protocol;
+  char *default_protocol, *utf8;
   int i, init_ret;
 
   g_return_val_if_fail (request != NULL, GFTP_EFATAL);
@@ -648,13 +648,30 @@
     gftp_set_account (request, tempentry->acct);
 
   gftp_set_hostname (request, tempentry->hostname);
-  gftp_set_directory (request, tempentry->remote_dir);
+
+  utf8 = gftp_string_from_utf8 (request, tempentry->remote_dir);
+  if (utf8 != NULL)
+    {
+      gftp_set_directory (request, utf8);
+      g_free (utf8);
+    }
+  else
+    gftp_set_directory (request, tempentry->remote_dir);
+
   gftp_set_port (request, tempentry->port);
 
   if (local_request != NULL && tempentry->local_dir != NULL &&
       *tempentry->local_dir != '\0')
     {
-      gftp_set_directory (local_request, tempentry->local_dir);
+      utf8 = gftp_string_from_utf8 (request, tempentry->local_dir);
+      if (utf8 != NULL)
+        {
+          gftp_set_directory (local_request, utf8);
+          g_free (utf8);
+        }
+      else
+        gftp_set_directory (local_request, tempentry->local_dir);
+
       if (refresh_local != NULL)
         *refresh_local = 1;
     }