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

Report information
The Basics
Id:
48173
Status:
resolved
Priority:
Low/Low
Queue:

People
Owner:
Nobody in particular
Requestors:
perl [...] evancarroll.com
Cc:
AdminCc:

BugTracker
Severity:
(no value)
Broken in:
0.65
Fixed in:
(no value)



Subject: Quote characters inside of the field that are not quote-characters because of context.
Is there anyway to parse something that is ,"Long Back 138" Extra wide", This isn't my csv, my guess would be a flag or something that specifies that quotes must be in proximity to the field separator. Test attached.
Subject: quote-characterness.t
use strict; use warnings; use feature ':5.10'; use Text::CSV_XS; my $csv = Text::CSV_XS->new({allow_loose_quotes=>1}); $csv->column_names(qw/foo bar baz/); use Test::More tests => 1; while ( my $row = $csv->getline_hr(*DATA) ) { } unlike ( $csv->error_diag, qr/EIQ - QUO character not allowed/, 'not getting 2023 any more' . $csv->error_diag ); ##PROBLEM WITH DATA IN : ',"Supercab Flareside 139" WB 4WD",' __DATA__ "","N2356A","Used","07/02/2009","21","9999.00","999.00","9999.00","9999.00","","","Available","","1FTEX14H1PKA29724","138924","1993","Ford","F-150","","","Supercab Flareside 139" WB 4WD","","","","","","Gas 8 Cylinder - 5.8L","White","","Manual/Automatic","","","","","0.00","","","","","",""
On Fri Jul 24 17:16:58 2009, ECARROLL wrote:
Show quoted text
> Is there anyway to parse something that is > ,"Long Back 138" Extra wide", > > This isn't my csv, my guess would be a flag or something that specifies > that quotes must be in proximity to the field separator. > > Test attached.
Not sure if this is the right way, but I was able to get around the problem with { escape_char => "\0", allow_loose_quotes => 1 }


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.