Unix and Linux Discussions Tagged with csv file |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
3 |
20,235 |
Answers to Frequently Asked Questions |
|
|
|
1 |
3,621 |
UNIX for Beginners Questions & Answers |
|
|
|
6 |
1,681 |
UNIX for Beginners Questions & Answers |
|
|
|
8 |
5,296 |
Shell Programming and Scripting |
|
|
|
6 |
4,840 |
Shell Programming and Scripting |
|
|
|
4 |
3,481 |
Shell Programming and Scripting |
|
|
|
11 |
6,649 |
Shell Programming and Scripting |
|
|
|
1 |
3,306 |
Shell Programming and Scripting |
|
|
|
2 |
5,229 |
UNIX for Beginners Questions & Answers |
|
|
|
4 |
4,470 |
Shell Programming and Scripting |
|
|
|
8 |
4,653 |
Shell Programming and Scripting |
|
|
|
15 |
9,173 |
Shell Programming and Scripting |
|
|
|
4 |
2,910 |
Shell Programming and Scripting |
|
|
|
2 |
2,846 |
Shell Programming and Scripting |
|
|
|
8 |
16,720 |
Shell Programming and Scripting |
|
|
|
3 |
10,197 |
Shell Programming and Scripting |
|
|
|
40 |
11,969 |
Shell Programming and Scripting |
|
|
|
5 |
3,144 |
Shell Programming and Scripting |
|
|
|
1 |
2,892 |
Shell Programming and Scripting |
|
|
|
2 |
12,136 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
7,887 |
Shell Programming and Scripting |
|
|
|
4 |
3,436 |
Shell Programming and Scripting |
|
|
|
3 |
5,991 |
Shell Programming and Scripting |
|
|
|
8 |
11,289 |
Shell Programming and Scripting |
|
|
|
2 |
2,269 |
Shell Programming and Scripting |
|
|
|
3 |
2,365 |
Shell Programming and Scripting |
|
|
|
1 |
2,549 |
UNIX for Advanced & Expert Users |
|
|
|
6 |
8,726 |
Shell Programming and Scripting |
|
|
|
3 |
9,100 |
Shell Programming and Scripting |
|
|
|
4 |
3,185 |
Shell Programming and Scripting |
|
|
|
1 |
3,459 |
Shell Programming and Scripting |
|
|
|
2 |
5,616 |
Shell Programming and Scripting |
|
|
|
12 |
6,583 |
UNIX for Dummies Questions & Answers |
|
|
|
6 |
5,619 |
Shell Programming and Scripting |
|
|
|
2 |
4,941 |
Shell Programming and Scripting |
|
|
|
2 |
7,989 |
UNIX for Dummies Questions & Answers |
Text::CSV::Encoded::Coder::EncodeGuess(3pm) User Contributed Perl Documentation Text::CSV::Encoded::Coder::EncodeGuess(3pm)
NAME
Text::CSV::Encoded::Coder::EncodeGuess - Text::CSV::Encoded coder class using Encode::Guess
SYNOPSIS
use Text::CSV::Encoded coder_class => 'Text::CSV::Encoded::Coder::EncodeGuess';
use Spreadsheet::ParseExcel;
my $csv = Text::CSV::Encoded->new();
$csv->encoding( ['ucs2', 'ascii'] ); # guessing ucs2 or ascii?
$csv->encoding_to_combine('shiftjis');
my $excel = Spreadsheet::ParseExcel::Workbook->Parse( $file );
my $sheet = $excel->{Worksheet}->[0];
for my $row ( $sheet->{MinRow} .. $sheet->{MaxRow} ) {
my @fields;
for my $col ( $sheet->{MinCol} .. $sheet->{MaxCol} ) {
my $cell = $sheet->{Cells}[$row][$col];
push @fields, $cell->{Val};
}
$csv->combine( @fields ) or die;
print $csv->string, "
";
}
DESCRIPTION
This module is inherited from Text::CSV::Encoded::Coder::Encode.
USE
Except for 2 attributes, same as Text::CSV::Encoded::Coder::Encode.
encoding_in
$csv = $csv->encoding_in( $encoding_list_ref );
The accessor to an encoding for pre-parsing CSV strings. If no encoding is given, returns current $encoding, otherwise the object itself.
$encoding_list_ref = $csv->encoding_in()
When you pass a list reference, it might guess the encoding from the given list.
$csv->encoding_in( ['shiftjis', 'euc-jp', 'iso-20022-jp'] );
If it cannot guess the encoding, the first encoding of the list is used.
encoding
$csv = $csv->encoding( $encoding_list_ref );
$encoding_list_ref = $csv->encoding();
You can pass a list reference to this attribute only:
* For list data consumed by combine().
* For list reference returned by getline().
In other word, in "combine" and "print", it might guess an encoding for the passing list data. If it cannot guess the encoding, the first
encoding of the list is used.
SEE ALSO
Encode, Encode::Guess
AUTHOR
Makamaka Hannyaharamitu, <makamaka[at]cpan.org>
COPYRIGHT AND LICENSE
Copyright 2008-2010 by Makamaka Hannyaharamitu
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.14.2 2010-04-26 Text::CSV::Encoded::Coder::EncodeGuess(3pm)