in reply to Escaping data for CSV files

I don't think you need to go overboard with escaping things. The "|" symbol for example does not need escaping in a CSV file. The common form of CSV as understood by say Excel works like this: