Reputation: 548
I am using the Text::CSV
module to parse lines into various fields from a tab-separated value file.
Examples of special characters in strings are
"CEZARY Å?UKASZEWICZ, PAWEÅ? WIETESKA","BÜRO FÜR"
My code goes as below:
my $file = $ARGV[0] or die "Need to get TSV file on the command line\n";
my $csv = Text::CSV->new({sep_char => "\t"});
open(my $data,'<', $file) or die "Could not open '$file' $!\n";
while (my $line= <$data>) {
if($csv->parse($line)){
my @curr_arr = $csv->fields();
}
} # end of while
close $data;
The above is some of the important parts of my code. The error I get is as follows:
cvs_xs error : 2026 - EIQ - Binary Character inside quoted field, binary off @pos 15
Upvotes: 5
Views: 1600