Re: ANNOUNCE: Text::CSV_XS 0.32
- From: "Mumia W." <paduille.4061.mumia.w+nospam@xxxxxxxxxxxxx>
- Date: Fri, 26 Oct 2007 02:16:23 -0500
On 10/24/2007 11:59 PM, Petr Vileta wrote:
H.Merijn Brand wrote:The following report has been written by the PAUSE namespace indexer.
Please contact modules@xxxxxxxx if there are any open questions.
Id: mldistwatch 925 2007-09-16 15:41:11Z k
User: HMBRAND (H.Merijn Brand)
Distribution file: Text-CSV_XS-0.32.tgz
Well, I'm pleased to see you here :-)
I tried to use your module Text::CSV_XS for storing some data to CSV file but without success. The problem is national characters. When I tried $csv->combine(('abc',áíá','def') I got "abc\n" only. Your module fail on first field where something greather then \x7f is. But no error, no warning.
Is this a bug or feature?
This sort-of works for me:
#!/usr/bin/perl
use strict;
use warnings;
use encoding 'iso-8859-1';
use Text::CSV_XS 0.32;
print "Version = $Text::CSV_XS::VERSION\n";
my $csv = Text::CSV_XS->new({binary => 1});
$csv->combine('abc','áíá','def') or warn("problem: $!\n");
print $csv->string(), "\n";
__END__
However, the output seems to be forced to UTF-8:
Version = 0.32
abc,áÃá,def
The above is properly interpreted in utf-8 as this:
Version = 0.32
abc,áíá,def
So Text::CSV_XS seems to ignore both the script encoding and the locale. I had set LANG=en_US.ISO-8859-1 in Linux before running the script.
And no error message is placed into $! upon error. I know, this is in the TODO section :-)
.
- Follow-Ups:
- Re: ANNOUNCE: Text::CSV_XS 0.32
- From: Petr Vileta
- Re: ANNOUNCE: Text::CSV_XS 0.32
- References:
- ANNOUNCE: Text::CSV_XS 0.32
- From: H.Merijn Brand
- Re: ANNOUNCE: Text::CSV_XS 0.32
- From: Petr Vileta
- ANNOUNCE: Text::CSV_XS 0.32
- Prev by Date: In SVG, persistent signs in path ?
- Next by Date: Re: ANNOUNCE: Text::CSV_XS 0.32
- Previous by thread: Re: ANNOUNCE: Text::CSV_XS 0.32
- Next by thread: Re: ANNOUNCE: Text::CSV_XS 0.32
- Index(es):
Relevant Pages
|
|