3

FasterCSV is raising MalformedCSVError (Illegal Quoting) in this line:

|0150|1161623|Medicamentos e genericos "EPP".|1423|PB|

This is the code:

FasterCSV.foreach(path_to_file, :col_sep => '|') do |row|
    ...
end

Any ideas? tks!!

Josué Lima
  • 483
  • 6
  • 18

1 Answers1

5

There is also an option quote_char which defaults to ", try changing it to something, which you don't expect in your data. You might try nil but I have never tried that.

FasterCSV.foreach(path_to_file, :col_sep => '|', :quote_char => "|") do |row|
  ...
end
rubish
  • 10,887
  • 3
  • 43
  • 57