Contacts – Linkedin/Mac Address Book

I wouldn’t want Linkedin to think that I’m abandoning the “platform,” on the other hand, with every dot-dot release they’re making it more difficult to stay.

So: How to get Connections out as contacts? On the web, access Connections, look under the gear icon at the top right (Settings), then at the top right of that page is an item Export LinkedIn [sic] Connections.

You’re given five choices for format: three choices for csv format, and two for vcf format.

In my experiments (who knows what might happen under a full moon, or on Tuesdays) all of these choices export eight-bit text files in MacRoman encoding. That is, e-acute and a handful of other accented characters work (if you read the file on a Mac), but trouble awaits for Greek or Cyrillic or lots of other characters. Any character unavailable in MacRoman is silently exported as a questionmark (?). Should a Linkedin member place a question mark in any field of his/her contact data, that would be exported indistinguishably from a character outside the 7-bit set; to a programmer, this means that any “?” must be treated as missing or unknown data. If you read the exported file in Windows, I don’t know, but I would expect you’d need to re-encode to a Windows-friendly encoding, or better, Unicode.

It seems that the Outlook Express and Microsoft Outlook format choices differ only in the sort order of the connections; I could find no other difference.

The Yahoo variant has all the essential fields, but a few dozen obscure fields are missing compared to the Outlook formats.

The two vcf formats both have CR/LF lineends, but there’s a spurious LF at the end of the file. The contents are apparently identical except for sort-order of the connections.

Linkedin’s code to produce the csv variant is faulty: The Linkedin programmers apparently forgot that backslash is used to “escape” certain codes. The programming error is that they do not check to see if a character in a Linkedin field contains a backslash. If a Linkedin user puts a backslash in a field, then the exported csv file almost certainly breaks.

If you want to retain accented, Cyrillic, and Greek characters, then you might try running the Linkedin Android app, syncing with Contacts, and then exporting Contacts to an SD card. I assume you’ll want to do this operation without contaminating your main (non-Linkedin) contacts; for me this was easy because I use an iPhone as my main device, and I have an auxiliary Android device whose contacts database I could devote to the Linkedin export operation. I have found bugs of various sorts; for example, the contact sync on the ANdroid side fails for various reasons at various points. Of my 2500 or so connections at the moment, 1800 or so are transferred, and the remainder is in limbo. No photos transfer at the moment. Don’t expect Linkedin to fix any of this.

Such an export operation exports a VCF file in UTF-8 (with CRLF lineends); accented, Cyrillic, and Greek characters are retained. However, a field having any character outside the 7-bit range is coded as quoted-printable (that is, in hex code) of UTF-8 encoding of the [Unicode] character. In fact, in my test, in a field that contains a character outside 7-bit ASCII, every character is coded in q-p hex, even those that don’t have to be (the ranges 0x21-0x3c and 0x3f-0x7e would be more sensibly and more conventionally represented literally as “!”-“<” and “>”-“~”).

When exporting connections to storage, an image may be coded as part of a connection’s entry; images in my test contain BASE64-encoded JPEG data, sized 80×80 pixels.

Phone numbers are not represented in canonical form; they are apparently retained in the form entered by each of your connections. So, there may or may not be a country code, with or without a + sign; there may or may not be a “(0)” or other designation of a dialing prefix; and there may or may not be hyphen, space, or other separators between country code, exchange, and local number fields. Chaos.

Export now, while you have the chance! There’s no telling when Linkedin might withdraw this feature.

[p.s, Should you export vCards from Mac AddressBook (or presumably, from Contacts), these seem to be in UTF-8 without encoding declaration, despite the vCard spec saying that any character encoding other than ASCII must be declared field-by-field. Lineends (for example, in notes) are represented as backslash n. Curiously, comma and semicolon are also backslash-escaped.]