From 5ff17ba27424a29ae8e0ff3776944ea2a64dcab6 Mon Sep 17 00:00:00 2001 From: hiro Date: Tue, 10 Apr 2007 05:08:16 +0000 Subject: convert filename from/to UTF-8 in CSV/LDIF import. git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@1605 ee746299-78ed-0310-b773-934348b2243d --- src/importcsv.c | 8 ++++---- src/importldif.c | 5 ++++- 2 files changed, 8 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/importcsv.c b/src/importcsv.c index 78322060..6b51b5dc 100644 --- a/src/importcsv.c +++ b/src/importcsv.c @@ -227,9 +227,6 @@ static gboolean imp_csv_field_list_toggle( GtkCList *clist, GdkEventButton *even return FALSE; } -static void imp_csv_modify_pressed( GtkWidget *widget, gpointer data ) { -} - static gint imp_csv_import_data( gchar *csvFile, AddressCache *cache ) { FILE *fp; gchar buf[BUFFSIZE]; @@ -383,11 +380,14 @@ static gboolean imp_csv_file_move() { } if( ! errFlag ) { - if ( ! imp_csv_load_fields( sFile ) ) { + gchar *sFSFile; + sFSFile = conv_filename_from_utf8( sFile ); + if ( ! imp_csv_load_fields( sFSFile ) ) { sMsg = _( "Error reading CSV fields." ); } else { retVal = TRUE; } + g_free( sFSFile ); } imp_csv_status_show( sMsg ); diff --git a/src/importldif.c b/src/importldif.c index a26501f7..01379589 100644 --- a/src/importldif.c +++ b/src/importldif.c @@ -329,8 +329,11 @@ static gboolean imp_ldif_file_move() { } if( ! errFlag ) { + gchar *sFSFile; /* Read attribute list */ - ldif_set_file( _ldifFile_, sFile ); + sFSFile = conv_filename_from_utf8( sFile ); + ldif_set_file( _ldifFile_, sFSFile ); + g_free( sFSFile ); if( ldif_read_tags( _ldifFile_ ) == MGU_SUCCESS ) { /* Load fields */ /* ldif_print_file( _ldifFile_, stdout ); */ -- cgit v1.2.3