Q about the FasterCSV

James Edward Gray II [mailto:james@grayproductions.net] :

# What's the correct way to handle:

···

#
# one, "two"
#
# ? Is the second field two or "two" or <space>"two". I have no

imho, the latter. computer just reads what is in between. no bias. no loss of any data. (though "correct" may not be a good term here since the input is not defined for strictly normal csvs)

btw, we also have semicolon and tab separated values here. same behavior except it's just semicolons or tabs that delimits. It would be nice if fastercsv can handle varying delimiters as well. just a thought. maybe, we can name it faster-delimiter :slight_smile:

# idea. I do know that it is invalid CSV though. :wink:

you've been really been helpful. thank you for your time.

kind regards -botp

I think both CSV and FasterCSV can do this. Same rules apply though,
just different delimiters.

In FasterCSV, it looks like this:

irb(main):007:0> FasterCSV.parse("a\tb\tc\n", :col_sep => "\t")
=> [["a", "b", "c"]]

In CSV, this:

irb(main):010:0> CSV.parse("a\tb\tc", "\t")
=> [["a", "b", "c"]]

···

On 4/28/06, Peña, Botp <botp@delmonte-phil.com> wrote:

btw, we also have semicolon and tab separated values here. same behavior except it's just semicolons or tabs that delimits. It would be nice if fastercsv can handle varying delimiters as well. just a thought. maybe, we can name it faster-delimiter :slight_smile: