Skip Menu |

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

Report information
The Basics
Id: 18703
Status: rejected
Priority: 0/
Queue: Text-CSV_XS

People
Owner: HMBRAND [...] cpan.org
Requestors: evan [...] dealermade.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.23
Fixed in: (no value)



Subject: Fails to use quote_char of '~'
If you set the quote_char to '~' and have an occurance of " within the code, the script crashes. #############PERL SCRIPT #!/usr/bin/perl use strict; no warnings; use DBI; my $file = shift; my $dbh = DBI->connect('DBI:CSV:f_dir=.;') or die "Cannot connect $!"; $dbh->{'csv_tables'}{'current_table'} = { file => $file, quote_char => '~' }; my $sth = $dbh->prepare(q{SELECT * FROM current_table}); $sth->execute(); while ( my @row = $sth->fetchrow_array ) { print @row; print "\n"; } ############DATA FILE ~Style Name~ ~5dr Crew Cab 130" WB 2WD LS~
It is not the quote_char that is your problem, but the fact that you still use the default escape_char, which is a double quote. The CSV standard tells you to only use escapes in front of special characters, and in this case it is in front of a space, which is not special.
It is not the quote_char that is your problem, but the fact that you still use the default escape_char, which is a double quote. The CSV standard tells you to only use escapes in front of special characters, and in this case it is in front of a space, which is not special.
It is not the quote_char that is your problem, but the fact that you still use the default escape_char, which is a double quote. The CSV standard tells you to only use escapes in front of special characters, and in this case it is in front of a space, which is not special.
It is not the quote_char that is your problem, but the fact that you still use the default escape_char, which is a double quote. The CSV standard tells you to only use escapes in front of special characters, and in this case it is in front of a space, which is not special.
It is not the quote_char that is your problem, but the fact that you still use the default escape_char, which is a double quote. The CSV standard tells you to only use escapes in front of special characters, and in this case it is in front of a space, which is not special.