Character set/encoding issues when dealing with Address Book import/export
convert a ~20 year-old home-grown ASCII
addressbook database system that was built upon the troff/bibIX bibliographic
database system. It's output contains one address entry per line, each line in
the form of tab-separated values (TSV). I have successfully used such a file to
import addresses into thunderbird, Palm Desktop, and Apple's AddressBook
application, v. 4.1 (687.1) running under Mac OS X 10.5.2 (Leopard). In evaluating
IMAP mail clients and address book systems that I can use across my platforms, I
have settled on using thunderbird as the mail agent, but using Address Book on the Apple for my
addresses, with the goal of exporting vCard files from that tool that can be
imported into t-bird and Palm Desktop. The problem is this; the original data
contains foreign (European) accent marks in the form of troff escape sequences,
which I would like to translate into a form usable within my new framework.
Bear with me if some of what follows is oversimplified or naive. The vi and awk
applications under Solaris are almost certainly NOT Unicode-capable. However,
I was able to use awk to change the troff escape sequences into what I assume
are probably their ISO-Latin-1 (8859-1) equivalents -- the characters look as
desired within vi. If I ftp such a file to a Mac, it also looks as desired within
vi. If I use the Apple "character pallette" to insert accented characters into
such a file, they appear the same, so I am guessing that this approach is also
using ISO-Latin-1 (understanding that ASCII, and perhaps ISO-Latin-1, is
Unicode, if the UTF-8 transport encoding is in use). However, if I import
such a file into AddressBook, the accented characters appear as other characters
altogether. If I change them within AddressBook and export them, they do not
appear as desired in outside applications. Clearly the two environments are
using different character encoding conventions. How do I cleanly solve this
issue? I do have iconv available, of course, and I suspect that use of it will
be part of the solution.
Thanks in advance for any helpful guidance, and best wishes for success in your
own computing endeavors...
iMac, MacBook Pro, Mac OS X (10.5.2)