------art_23731_5098907.1146116947182
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

I did check this problem out finally:

In the csv file,
line 1,"1"
line 2,  "2"

the line 1 could be parsed successfully, but the line 2 will failed.
The only difference between the two lines is that there is a space char
between the comma char and the double quote char in line 2, while line 1
not.

I suspect that space char between the comma char(,) and the double quote
char(") make the faster csv parser to take the space char as part of the
second field. And then the double quote should be escaped, but it hadn't.

Is it a bug or expected?

On 4/27/06, Logan Capaldo <logancapaldo / gmail.com> wrote:
>
>
> On Apr 26, 2006, at 11:38 PM, Eric Luo wrote:
>
> > Hi,
> >
> > I have a csv file, which has the following data, for example:
> > test.csv
> > -------------
> > line 1, "1"
> > line 2, "2"
> >
> > And I use the following code snippet to parse this file,
> >
> > require 'fastercsv'
> > FasterCSV.read("test.csv")
> >
>
> Remember its "comma-separated", fiddling around I discovered that
>
> line 1,"1"
> line 2,"2"
>
> Works absolutely fine. I'm not CSV guru so I don't know if FasterCSV
> has a bug or if your CSV is malformed.
>
>
>

------art_23731_5098907.1146116947182--