Skip Menu |

This queue is for tickets about the Text-CSV_XS CPAN distribution.

Report information
The Basics
Id: 7149
Status: resolved
Priority: 0/
Queue: Text-CSV_XS

People
Owner: HMBRAND [...] cpan.org
Requestors: david.pitt [...] bigpond.com
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 0.25
Fixed in: 0.43



Subject: Text::CSV_XS fails on ""19/07/2004"" quoting style
Text::CSV_XS fails to parse data of the form: 0,0,0,0,0,0,2476,3674,0,0,0,0,0,""19/07/2004"",, The reason is the unescaped double quotes around the date, it expects: 0,0,0,0,0,0,2476,3674,0,0,0,0,0,"""19/07/2004""",, However Text::ParseWords::quotewords handles it. If Text::CSV_XS fails I then try Text::ParseWords::quotewords which handles this quoting style correctly. This is ugly, it would be better if Text::CSV_XS also handled this style.
From: David Pitt <david.pitt [...] bigpond.com>
To: "'bug-Text-CSV_XS [...] rt.cpan.org'" <bug-Text-CSV_XS [...] rt.cpan.org>
Subject: RE: [cpan #7149] AutoReply: Text::CSV_XS fails on ""19/07/2004"" quoting style
Date: Sat, 31 Jul 2004 10:47:10 +1000
RT-Send-Cc:
Apparently Paradox outputs CSV data in this dubious style. BTW, I forgot to mention how pleased I otherwise am with Text::CSV_XS - highly functional and about 10 times faster then Text::CSV in our environment. David Pitt david.pitt@bigpond.com +61 3 9882 0276 On Wednesday, 28 July 2004 5:33 PM, Text-CSV_XS [SMTP:bug-Text-CSV_XS@rt.cpan.org] wrote: Show quoted text
> > Greetings, > This message has been automatically generated in response to your bug > report about Text-CSV_XS, a summary of which appears below. > > There is no need to reply to this message right now. Your bug in Text-CSV_XS > has been assigned an ID of [cpan #7149]. Please include the string: > > [cpan #7149] > > in the subject line of all future correspondence about this issue. To do so, > you may reply to this message. > > Thank you, > bug-Text-CSV_XS@rt.cpan.org > > ------------------------------------------------------------------------- > Text::CSV_XS fails to parse data of the form: > > 0,0,0,0,0,0,2476,3674,0,0,0,0,0,""19/07/2004"",, > > The reason is the unescaped double quotes around the date, it expects: > > 0,0,0,0,0,0,2476,3674,0,0,0,0,0,"""19/07/2004""",, > > However Text::ParseWords::quotewords handles it. If Text::CSV_XS fails I then > try Text::ParseWords::quotewords which handles this quoting style correctly. > > This is ugly, it would be better if Text::CSV_XS also handled this style.
That will work as of version 0.43 with my $csv = Text::CSV_XS->new ({ allow_loose_quotes => 1, escape_char => undef }); Note that since you allow loose quotes, the inner pair is returned as part of the field, which you can strip yourself