aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorSuman Manjunath <msuman@src.gnome.org>2008-01-07 02:54:04 +0800
committerSuman Manjunath <msuman@src.gnome.org>2008-01-07 02:54:04 +0800
commit45d410de1e13a91e0e41a55b442d256112b031da (patch)
tree66a12afe8622a27133ddab32480698b4fda37a5a /plugins
parent00d89fdac2c92ceeae3478713f6fc247841d3da7 (diff)
downloadgsoc2013-evolution-45d410de1e13a91e0e41a55b442d256112b031da.tar.gz
gsoc2013-evolution-45d410de1e13a91e0e41a55b442d256112b031da.tar.zst
gsoc2013-evolution-45d410de1e13a91e0e41a55b442d256112b031da.zip
Patch from João Vale <jpvale@gmail.com>: Fix for bug #375580 (Use ISO-8859-1 encoding to store contacts in iPod)
svn path=/trunk/; revision=34771
Diffstat (limited to 'plugins')
-rw-r--r--plugins/ipod-sync/ChangeLog9
-rw-r--r--plugins/ipod-sync/ipod-sync.c6
2 files changed, 13 insertions, 2 deletions
diff --git a/plugins/ipod-sync/ChangeLog b/plugins/ipod-sync/ChangeLog
index 2c0b42a170..804f29b157 100644
--- a/plugins/ipod-sync/ChangeLog
+++ b/plugins/ipod-sync/ChangeLog
@@ -1,3 +1,10 @@
+2008-01-07 João Vale <jpvale@gmail.com>
+
+ ** Fix for bug #375580
+
+ * ipod-sync.c: (destination_save_addressbook): Use ISO-8859-1 encoding
+ to store contacts in iPod.
+
2007-11-11 Gilles Dartiguelongue <gdartigu@svn.gnome.org>
** Fix bug #495872
@@ -73,7 +80,7 @@
2005-10-18 Srinivasa Ragavan <sragavan@novell.com>
* Created the iPod sync plugin. It based on Justin Wakes bounty
- work and rodrigo's save callendar plugin.
+ work and rodrigo's save calendar plugin.
diff --git a/plugins/ipod-sync/ipod-sync.c b/plugins/ipod-sync/ipod-sync.c
index 31242fe83d..bca4242810 100644
--- a/plugins/ipod-sync/ipod-sync.c
+++ b/plugins/ipod-sync/ipod-sync.c
@@ -113,9 +113,12 @@ destination_save_addressbook (EPlugin *ep, EABPopupTargetSource *target)
EContact *contact = tmp->data;
gchar *temp = e_vcard_to_string (E_VCARD (contact), EVC_FORMAT_VCARD_30);
gchar *vcard;
+ gchar *converted_vcard;
+ gsize vcard_latin1_length;
vcard = g_strconcat(temp, "\r\n", NULL);
- if ((result = gnome_vfs_write (handle, (gconstpointer) vcard, strlen (vcard), &bytes_written))
+ converted_vcard = g_convert(vcard, -1, "ISO-8859-1", "UTF-8", NULL, &vcard_latin1_length, NULL);
+ if ((result = gnome_vfs_write (handle, (gconstpointer) converted_vcard, vcard_latin1_length, &bytes_written))
!= GNOME_VFS_OK) {
display_error_message (gtk_widget_get_toplevel (GTK_WIDGET (target->selector)),
gnome_vfs_result_to_string (result));
@@ -124,6 +127,7 @@ destination_save_addressbook (EPlugin *ep, EABPopupTargetSource *target)
g_object_unref (contact);
g_free (temp);
g_free (vcard);
+ g_free (converted_vcard);
}
}