# FasterCSV: ignoring returns within a db field

**URL:** <https://www.ruby-forum.com/t/fastercsv-ignoring-returns-within-a-db-field/120125>\
**Category:** Rails\
**Created:** [November 13, 2007, 11:10pm UTC](https://www.ruby-forum.com/t/fastercsv-ignoring-returns-within-a-db-field/120125 "2007-11-13T23:10:10Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![soleil](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/ce7236/32.png) [@soleil](https://www.ruby-forum.com/u/soleil)\
**Post date:** [November 13, 2007, 11:10pm UTC](https://www.ruby-forum.com/t/fastercsv-ignoring-returns-within-a-db-field/120125/1 "2007-11-13T23:10:10Z")

</div>

Hello,

my goal is to import data into a MySQL-Database using FasterCSV:

Does anyone have an idea how I can force FasterCSV to ignore carriage  
returns that occur within(!) a database text field and to read until  
“line feed” = end or row is reached? I tried to use option “:row\_sep”  
but it did not work, it still uses the returns within the text field as  
end of row, too:

FasterCSV.foreach(“test”, :headers =\> :first\_row, :col\_sep =\> “,”,  
:row\_sep =\> “\n”) do |row|

(\n should be line feed in ruby, right?)

I also thought about replacing the return and line feed symbols by  
something else, but I don’t want to loose the return-information which I  
need for displaying the text of this field in my view.

Any suggestions would be highly appreciated …

Thanks very much,  
soleil
