See here for background:
http://forums.fengoffice.com/index.php?topic=3714.0I've done a re-write of the previous version. I also have a version of the patch that adds a second and third address line to each address (see
http://forums.fengoffice.com/index.php?topic=3919.0 ) and because I also have several versions for 1.6.2 and 1.7 in various states of completion...the scope is getting a bit beyond me. I'm not quite as sure about this version because I can't as easily visualize all versions of my entire code. It has gotten a bit big to keep my head wrapped around, but I think I'm just imagining problems at this point. I'm an IT guy, not a coder!

However! I'm pleased to say that the code works great for us; much better than the last one (which went into 1.7). Some examples of the improvement is that it can classify phone numbers better, it understands parameters better ( "TYPE=HOME,WORK;" and "TYPE=HOME;TYPE=WORK" come out looking the same! ), and for contacts that are already in FO it can usually do a lossless export and reimport including FO only fields. It tags those FO only fields as custom in the export and the importer knows where to look. AFAIK the way it does this is within the vcard spec.
It is commented out for a later version, but this code was also close to being able to handle strings that are have their own delimiter escaped within a field. The regex matches odd or even numbers of backslashes to tell preg_match_all() whether to break to the next field or print the backslashes and the delimiter literally. Didn't quite get that part working.
I'm going to attach four versions of "v2 final", if you will. At one point each one was thoroughly tested and I THINK I've kept them cleanly applying to their various code-bases. You might be able to apply them and use them in production straight-out, but I'm only using the last one from here on out.
Since my patch list has been growing it is my hope that the vcard part will get committed, and that maybe even the devs will see value in having two more address lines in the contacts object (since vcard supports it and that support is already working in that version of this patch). It'd let me juggle less but I suppose I'll live if I have to keep updating these patches myself to your new versions.

Same patch instructions as the last version. I think that is about it. Let me know if you have any questions.
Hope these help,
Mark
1. vcard v2 for 1.6.2
2. vcard v2 for 1.6.2 w/ address line 2/3 expansion
3. vcard v2 for 1.7
4. vcard v2 for 1.7 w/ address line 2/3 expansion <(in production!)