Fixing CSV Exports
The AppleScript that came with this post is no longer available. The fix below works without it.

Bento 1.0v2 could write broken CSV files when a field contained double quotes.
The fault
CSV allows each field to be wrapped in double quotes, and any double quote inside a field is written twice so it is not mistaken for the end of the field. Bento did write the doubled quotes, but for each one it moved the closing quote one character to the left. Programs reading the file then split fields in the wrong places.
The workaround at the time
We published an AppleScript, Double Quote Fixer, that re-read the exported file and put the closing quotes back. It needed an extra calculation field holding a single character, such as a pipe, to mark the end of each record, and it only coped with one field containing quotes.
If you hit this now
The script is no longer available, and later Bento versions handled quotes correctly. If an export from an old library looks scrambled in Numbers or another app:
- Search the library for the double-quote character and note which fields contain it.
- Replace straight double quotes with typographic ones, or remove them, in a copy of the library.
- Export again.
Importing the file into a spreadsheet first, rather than straight into a database, makes misaligned columns easy to spot.


