[evolution-patches] e-d-s portion of addressbook fix for #54528



apple's addressbook puts "PHOTO;BASE64:" for its photos in exported
vCard 3.0 vcfs.  This is really rather broken.  the encoding is no
longer called "BASE64" in vCard 3.0 - it's "b".  Also, you're not
supposed to be able to leave off the ENCODING parameter name.  So really
this should be "PHOTO;ENCODING=b:"..

anyhow, this patch converts the former to the latter while parsing.

Chris
Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution-data-server/addressbook/ChangeLog,v
retrieving revision 1.110
diff -u -r1.110 ChangeLog
--- ChangeLog	30 Mar 2004 08:28:55 -0000	1.110
+++ ChangeLog	30 Mar 2004 22:22:59 -0000
@@ -1,5 +1,13 @@
 2004-03-30  Chris Toshok  <toshok ximian com>
 
+	[ backend portion of fix for #54528 ]
+	
+	* libebook/e-vcard.c (read_attribute_params): deal with vcards
+	that specify the encoding as "BASE64", even though this isn't the
+	proper encoding type for vcard 3.0 cards (that's 'b').
+
+2004-03-30  Chris Toshok  <toshok ximian com>
+
 	[ looks like this fixes #55527 ]
 	* libedata-book/e-data-book-view.c (e_data_book_view_construct):
 	use bonobo_object_dup_ref instead of CORBA_Object_duplicate here.
Index: libebook/e-vcard.c
===================================================================
RCS file: /cvs/gnome/evolution-data-server/addressbook/libebook/e-vcard.c,v
retrieving revision 1.10
diff -u -r1.10 e-vcard.c
--- libebook/e-vcard.c	26 Feb 2004 15:54:10 -0000	1.10
+++ libebook/e-vcard.c	30 Mar 2004 22:23:00 -0000
@@ -377,6 +377,13 @@
 						param_name = "ENCODING";
 						*quoted_printable = TRUE;
 					}
+					/* apple's broken addressbook app outputs naked BASE64
+					   parameters, which aren't even vcard 3.0 compliant. */
+					else if (!g_ascii_strcasecmp (str->str,
+								      "base64")) {
+						param_name = "ENCODING";
+						g_string_assign (str, "b");
+					}
 					else {
 						param_name = "TYPE";
 					}


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]