I'm making some progress on a workaround.
I found that exporting a vCard exposed the extra line spaces; the vCard has twice the \n as expected.
I also found that taking the text on a round trip through TextWrangler resolved the EOL bug. When I paste back from TW into Address Book then export vCard the \n count is as expected.
I wonder if I can write an AppleScript to use TW to translate the EOL characters by this round-trip copy/paste method. Crude, but probably effective.
I have a candidate fix for this bug. It's a bit of a kludge that relies on Bento, Address Book, TextWrangler, and Contact Cleaner.
I'm still testing the resuts, but early tests look good.
Details on my blog, excerpted below:
pdate 7/3/2012: vCard export/import won't work, but a hybrid hack looks promising
Many fields are omitted from Address Book's vCard option. So I can't do clean up and restore from there, I'd lose too much. Worse, Address Book Import is also quite weak. Instead on a test machine running Lion and Address Book 6.0 I tried this convoluted process on a copy of my Snow Leopard Address Book.
- I selected all contacts and exported Group vCard (1820 contacts)
- I used Bento to delete all Notes (select column, hit delete, exit Bento)
- I used TextWrangler to replace \n\n with \n everywhere and remove a trailing \n at the end of the NOTES string. This removed some paragraph definitions but I didn't mind that. Simpler to do.
- I then imported the vCard. Address Book said it has found 1818 duplicates and merged those in; I ended up with 1822 Cards. So there were two duplicates.
The results seemed good, I no longer found duplicate notes. The Address Book synchronized to iCloud far more quickly than before, and iCloud also appeared fine and without duplicate Notes.
I considered using Address Book merge to resolve the two duplicate Cards, but it is too aggressive and would merge addresses I wish to keep separate. So I used Contacts Cleaner. It found 3 duplicates and a (new) 5-6 duplicate addresses. Those were quickly resolved and I ended up with 1819 cards.
This approach, though inelegant, appears to work. I'll do some more testing before I try it on my real Address Book. (I haven't tested yet to see if Snowie will open a Lion Address Book. I suspect not, but the process I used will probably work on Snowie. As long as one backups up the Archive, it's easy to restore an Address Book.
I had a fix candidate -- but then I disovered that my Groups were metastasizing and "poisoning" every machine that I connected to my iCloud account. Irreversibly. Even when I removed the iCloud account.
Details at my blog post , but this is what my Groups look like in Address Book and iCloud:
Large scale replication of Groups. No way, short of hours of click and delete, to eliminate them.
I'm done. iCloud and Lion aren't really ready. It's not the bugs (though they're bad enough), it's the lack of recovery and troubleshooting tools - the iCloud equivalent of MobileMe sync services reset. It's as though Apple though they'd get everything right -- despite their MobileMe history. (Ironically, MM worked well for me over the past six months.)
I'll try again when Mountain Lion is out.
Mountain Lion didn't fix anything, but it's much faster than Lion at iCloud sync.
What did fix things were two AppleScripts.
One is from Nigel Garvey of MacScripter, it fixed the line terminations.
The other was a simple script I wrote to remove the replicated groups:
I ran Mr Garvey's line termination fix script against my Snow Leopard Address Book, then used the Group delete script to clean up iCloud, then imported into iCloud. Seems to work.