| Message: 91731 |
 |
BY: James Gray (bbazzarrakk) DATE: 2009-11-24 20:17 SUBJECT: RE: Unquoted fields do not allow \r or \n FasterCSV columns exactly as you described them:
#!/usr/bin/env ruby -wKU
require "rubygems"
require "faster_csv"
p FCSV.parse(DATA.read)
__END__
21,43,"Note:
blah this is a note",xyz,pdq
The third column was placed into one String, including the newline.
I did remove the spaces after your commas. I hope they aren't in the real data. If they are though, you could probably use :col_sep => ", " (note the space after the comma) instead.
Hope that helps.
| |