CHCSVParser
CHCSVParser copied to clipboard
Fixed an exception when nil fields are sent to the exporter
The docs say it is alright to send empty strings and nils to the CSV Exporter as fields. However nil fields in the first line cause exception, because _firstLineKeys NSArray won't accept. I followed the example of the next lines (of writeField:) which replace nil with empty string - which is acceptable in the array.
Same in the CSVParser, although nil fields there can cause problems if there are more than one. I think the "use first line as keys" option isn't very robust.