[Vobject] Embedding a photo into vcard

Jeffrey Harris jeffrey at osafoundation.org
Mon Dec 29 15:45:02 CST 2008


Hi Markus,

> To fix it, it would be great if the photo behaviour would either do  
> not wrap the line at all (whole photo string in one line) or write it  
> like addressbook.

Apple Address Book is deeply, deeply broken when it comes to embedded
photos.  Until now I'd only bumped into their non-standard
*serialization* of photos (rather than ENCODING=b which is what's
required for vcard 3.0, they use an un-named BASE64 parameter, which
isn't even technically syntactically valid for vcard 3.0).

In the past I've added a work around to treat an unnamed BASE64 as
equivalent to ENCODING=b, but you're right, the issue goes deeper.
Whatever parsing code the operating system uses for vcards is extremely
picky about how lines are wrapped.  I can't for the life of me figure
out what heuristic it's using, but it's obviously *not* simply
unwrapping the photo's value then base64 decoding it, like it ought to.

I've added a work around to vobject 0.8.0 (releasing it now).
Basically, the default behavior is now to not wrap vcard photos.

Sincerely,
Jeffrey


More information about the VObject mailing list