PalmOS: Empty field being added

I came across an interesting bug in iCal/Missing Sync/PalmOS the other day. It seems that PalmOS does not like the first character of a field to be the null character (\0). Having such a character in a field is okay if you are just viewing a record, but if you edit such a record you will get a nasty crash. It actually took me quite some time to figure out what was going on, but more importantly, how to fix it. I was lucky in a sense, as the records I was having issues with were all Contacts (Address Book entries). To begin with I thought it was a problem with Agendus, and I tried reinstalling all of my data and applications. No good. Eventually I figured out what was actually going on. As far as I can tell, it all came from the import of data I did a week or so ago. Except that at least one record other than these was also affected. To solve it was simple. Drag the affected records out of Address Book and then drag the generated file back in. Apparently Address Book’s Export As vCard has better data checking than the import. Come to think of it, it may have been the ABImporter I used.