Text::CSV::Encoded - Encoding aware Text::CSV.
# Here in Perl 5.8 or later $csv = Text::CSV::Encoded->new ({ encoding_in => "iso-8859-1", # the encoding comes into Perl encoding_out => "cp1252", # the encoding comes out of Perl }); # parsing CSV is regarded as input $csv->parse( $line ); # $line is a iso-8859-1 encoded string @columns = $csv->fields(); # they are unicode data
This module inherits Text::CSV and is aware of input/output encodings.
This module sources are hosted on github https://github.com/singingfish/Text-CSV-Encoded and uses Dist::Zilla to generate the distribution. It can be istalled:
Dist::Zilla
cpanm https://github.com/singingfish/Text-CSV-Encoded.git
cpan Text::CSV::Encoded cpanm https://github.com/singingfish/Text-CSV-Encoded
git clone https://github.com/singingfish/Text-CSV-Encoded.git cd https://github.com/singingfish/Text-CSV-Encoded perl Makefile.PL make make test make install
This distribution requires Perl v5.8.0.
This distribution requires the following modules:
Test::Pod (version 1.41)
Text::CSV (version 1.31)
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Text::CSV::Encoded, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Text::CSV::Encoded
CPAN shell
perl -MCPAN -e shell install Text::CSV::Encoded
For more information on module installation, please visit the detailed CPAN module installation guide.