Unix and Linux Discussions Tagged with csv |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
5 |
12,858 |
UNIX for Beginners Questions & Answers |
|
|
|
1 |
14,266 |
UNIX for Beginners Questions & Answers |
|
|
|
2 |
31,036 |
Answers to Frequently Asked Questions |
|
|
|
3 |
20,499 |
Answers to Frequently Asked Questions |
|
|
|
1 |
9,553 |
UNIX for Beginners Questions & Answers |
|
|
|
1 |
7,416 |
UNIX for Beginners Questions & Answers |
|
|
|
7 |
12,396 |
UNIX for Beginners Questions & Answers |
|
|
|
16 |
27,303 |
UNIX for Beginners Questions & Answers |
|
|
|
5 |
4,246 |
UNIX for Beginners Questions & Answers |
|
|
|
1 |
12,858 |
Programming |
|
|
|
9 |
7,569 |
UNIX for Beginners Questions & Answers |
|
|
|
6 |
8,795 |
Shell Programming and Scripting |
|
|
|
1 |
14,256 |
Shell Programming and Scripting |
|
|
|
3 |
6,057 |
UNIX for Beginners Questions & Answers |
|
|
|
10 |
10,105 |
Shell Programming and Scripting |
|
|
|
1 |
6,284 |
UNIX for Beginners Questions & Answers |
|
|
|
3 |
4,218 |
UNIX for Beginners Questions & Answers |
|
|
|
1 |
5,293 |
UNIX for Beginners Questions & Answers |
|
|
|
2 |
5,974 |
Shell Programming and Scripting |
|
|
|
0 |
14,218 |
Programming |
|
|
|
6 |
3,871 |
UNIX for Beginners Questions & Answers |
|
|
|
6 |
6,121 |
Shell Programming and Scripting |
|
|
|
2 |
4,742 |
UNIX for Beginners Questions & Answers |
|
|
|
6 |
5,791 |
UNIX for Beginners Questions & Answers |
|
|
|
4 |
3,959 |
UNIX for Beginners Questions & Answers |
|
|
|
1 |
3,564 |
UNIX for Beginners Questions & Answers |
|
|
|
1 |
7,643 |
UNIX for Beginners Questions & Answers |
|
|
|
14 |
7,019 |
UNIX for Beginners Questions & Answers |
|
|
|
8 |
4,564 |
Shell Programming and Scripting |
|
|
|
7 |
6,579 |
UNIX for Beginners Questions & Answers |
|
|
|
2 |
2,326 |
UNIX for Beginners Questions & Answers |
|
|
|
5 |
3,399 |
UNIX for Beginners Questions & Answers |
|
|
|
6 |
5,874 |
UNIX for Beginners Questions & Answers |
|
|
|
1 |
3,735 |
UNIX for Beginners Questions & Answers |
|
|
|
3 |
3,860 |
UNIX for Beginners Questions & Answers |
|
|
|
0 |
5,251 |
Shell Programming and Scripting |
|
|
|
1 |
6,020 |
Shell Programming and Scripting |
|
|
|
9 |
3,796 |
UNIX for Beginners Questions & Answers |
|
|
|
8 |
4,563 |
UNIX for Beginners Questions & Answers |
|
|
|
4 |
4,520 |
UNIX for Beginners 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)