Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: bpaterni [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.70
Fixed in: 1.13



Subject: Feature Request: Read Control Codes < 0x20
Date: Tue, 2 Dec 2014 15:51:36 -0600
To: bug-Text-CSV_XS [...] rt.cpan.org
From: Brian Paterni <bpaterni [...] gmail.com>
Hi Thanks for resolving bug #99941 https://rt.cpan.org/Public/Bug/Display.html?id=99941 As I'm working to refactor Text::CSV_XS back into my project though, I ran across another quoted fields problem. This time I can't seem to get CSV_XS to stop quoting some fields... The application I'm dealing with expects control characters < 0x20 in some data fields. And even though Text::CSV_XS's documentation does mention that it only accepts characters >= 0x20, running the data through CSV_XS does seem to work to a degree, as these character do seem to be printing in the output. The only problem is that CSV_XS is detecting these characters as 'must-quote'-able characters and quotes them on output even with quote_binary disabled. I've been reading and re-reading the documentation to try and find a work around, but so far I've coming up empty. The following should be a basic test case. I would like to be able to leave field 3 unquoted in the output if possible: #!/bin/perl use strict; use warnings; use Text::CSV_XS; my $csv = Text::CSV_XS->new({ auto_diag => 1, diag_verbose => 2, binary => 1, keep_meta_info => 11, quote_space => 0, quote_binary => 0, # allow_loose_escapes => 1, allow_loose_quotes => 1, }); my $line = "Hello,World,\x13Field\x13With\x13Control\x13Chars"; print "input: $line\n"; $csv->parse($line); my @flds = $csv->fields(); $csv->combine(@flds); print 'output: ', $csv->string, "\n";
Subject: Re: [rt.cpan.org #100676] Feature Request: Read Control Codes < 0x20
Date: Wed, 3 Dec 2014 10:40:51 +0100
To: bug-Text-CSV_XS [...] rt.cpan.org
From: "H.Merijn Brand" <h.m.brand [...] xs4all.nl>
On Tue, 2 Dec 2014 16:51:46 -0500, "Brian Paterni via RT" <bug-Text-CSV_XS@rt.cpan.org> wrote: Show quoted text
> The following should be a basic test case. I would like to be able to > leave field 3 unquoted in the output if possible:
patched and pushed -- H.Merijn Brand http://tux.nl Perl Monger http://amsterdam.pm.org/ using perl5.00307 .. 5.21 porting perl5 on HP-UX, AIX, and openSUSE http://mirrors.develooper.com/hpux/ http://www.test-smoke.org/ http://qa.perl.org http://www.goldmark.org/jeff/stupid-disclaimers/
Download (untitled)
application/pgp-signature 490b

Message body not shown because it is not plain text.