Re: Q about the FasterCSV


#1

Dave B. [mailto:removed_email_address@domain.invalid] :

Oh, I don’t want the patch. It’s a terrible idea! “foo, bar, ‘baz’”

aren’t CSV, they’re CASWSSV (comma and some white-space separated

values). That’s got to be a whole new library :slight_smile:

as long as the values are bounded by a comma, then they are csv
delimited. space is a value, right?

eg

“foo, bar, ‘baz’”, foo, “bar” , foo"bar", foo’bar’

can be parsed as (by the eye as of the moment):

[“foo, bar, ‘baz’”," foo"," “bar” “,” foo"bar""," foo’bar’"]

maybe, this can be a nice little rubyquiz?

not all data is perfect, that is why there are rubyists like Dave and
James :slight_smile:

thanks and kind regards -botp


#2

On Apr 27, 2006, at 9:36 PM, Peña, Botp wrote:

as long as the values are bounded by a comma, then they are csv
delimited. space is a value, right?

There’s no problem with the space, correct. The quote after it is
what makes the document illegal. You always have to escape the
escape character, and that’s the quote. To do that, a field must
begin with a quote…

What’s the correct way to handle:

one, “two”

? Is the second field two or “two” or “two”. I have no
idea. I do know that it is invalid CSV though. :wink:

James Edward G. II