Menu

#5 Vcard import/export/convert not compatible/standard conform

open
nobody
None
5
2016-01-17
2016-01-17
luc
No

Importing vcards does not decode quoted printable fields.

Output to vcard does not set the VERSION field.

I assume that it is quite hard to get vcard parsing right so it might be a good idea to look for an existing library.

If such a lib is found and works well vcard can also be the new backend storage format. There is an item in the TODO file about choosing a new file format. In such cases I would always go for an existing well defined standard format.

Discussion

  • Raphaël

    Raphaël - 2016-01-17
    • About VERSION at export, that's right, we could do it. (but to be fair, it was not mandatory before 4.0 came out)
    • Importing vcard DOES handle quoted-printable fields ONLY IF using abook 0.6.1 AND compiled using the libvformat (which is an optional compile-time feature)
    • vcard format is clearly a moot point, and a very important one in the long run. Implementing a vCard 4.0 (RFC 6350) library is out of the scope of abook, but using such a library would be a big win for abook.
    • The issue about vcard is simply the lack of good copyleft C library to parse newest vCard format (not even speaking about xCard, hCard, jCard or even vCard extensions). AFAICT the nearest match is currently https://github.com/drppublic/libVCard4 (which MIT and C++)
      I bet most others (like https://git.gnome.org/browse/evolution/tree/addressbook/importers/evolution-vcard-importer.c are probably bound to libs^Wframeworks like glib, qt, ...)

    Indeed, i's a shame we don't have a free; standalone, simple and still complete ANSI C library to parse a 5 years old RFC.
    But that's far from surprising, tonight I just learnt about the sad story of this nice 15 years old RFC 2782 that none of the web browsers ever implemented)

    About your last point, and to be exhaustive, I think that discussing the default abook file format is, at least, premature.

     
    • luc

      luc - 2016-01-17

      Thank you for that information, I did not know about --enable-vformat as
      I only used a precompiled abook from the arch repository.

      But when I try to compile abook from git I get the following warning for
      several files that include database.h

      database.h:64:12: warning: inline function ‘field_id’ declared but never defined
      

      and when linking I get

      /home/luc/vcs/abook/filter.c:944: undefined reference to `field_id'
      

      The full output of make is
      here.

       
  • luc

    luc - 2016-01-17

    (Sorry for the repost the email was so slow that I was wondering id it was even accepted)

     

    Last edit: luc 2016-01-17

Log in to post a comment.