I have a TSV file with no quote chars. Whenever a \t
occurs in the data, it is always to separate columns, and never a part of a column value. Whenever a "
occurs, it is always a part of a column value, and never to enclose column values.
I would like to read this CSV in Ruby but it gives me
/Users/.rvm/rubies/ruby-1.9.3-p545/lib/ruby/1.9.1/csv.rb:1925:in `block (2 levels) in shift': Illegal quoting in line 9506. (CSV::MalformedCSVError)
My code is:
CSV.foreach(input_file, { :col_sep => "\t", :headers => true}) do |row|
puts row
end
Any way to get around this problem?