Unix and Linux Discussions Tagged with amp |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
1 |
10,180 |
UNIX for Beginners Questions & Answers |
|
|
|
1 |
3,794 |
UNIX for Beginners Questions & Answers |
|
|
|
6 |
3,775 |
UNIX for Beginners Questions & Answers |
|
|
|
2 |
10,914 |
UNIX for Beginners Questions & Answers |
|
|
|
1 |
2,933 |
UNIX for Beginners Questions & Answers |
|
|
|
2 |
2,988 |
UNIX for Beginners Questions & Answers |
|
|
|
8 |
41,682 |
Solaris |
|
|
|
5 |
2,836 |
UNIX for Beginners Questions & Answers |
|
|
|
0 |
1,269 |
What is on Your Mind? |
|
|
|
33 |
35,084 |
Solaris |
|
|
|
2 |
3,656 |
Solaris |
|
|
|
2 |
3,545 |
IP Networking |
|
|
|
2 |
3,115 |
AIX |
|
|
|
0 |
1,892 |
Software Releases - RSS News |
|
|
|
2 |
7,546 |
Solaris |
|
|
|
2 |
2,174 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
3,039 |
Programming |
|
|
|
0 |
2,354 |
OS X Support RSS |
|
|
|
1 |
29,310 |
Shell Programming and Scripting |
|
|
|
0 |
1,977 |
Solaris BigAdmin RSS |
|
|
|
7 |
12,328 |
Ubuntu |
|
|
|
0 |
1,343 |
Complex Event Processing RSS News |
|
|
|
0 |
1,888 |
Cartoons for Geeks |
|
|
|
0 |
1,272 |
Software Releases - RSS News |
|
|
|
6 |
4,733 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
1,497 |
UNIX for Dummies Questions & Answers |
|
|
|
0 |
2,432 |
Cartoons for Geeks |
|
|
|
0 |
1,761 |
Complex Event Processing RSS News |
|
|
|
0 |
2,386 |
Cartoons for Geeks |
|
|
|
0 |
3,088 |
HP Server News and Podcasts RSS |
|
|
|
0 |
1,671 |
MySQL DevZone RSS |
|
|
|
5 |
6,430 |
UNIX for Advanced & Expert Users |
|
|
|
0 |
1,698 |
Complex Event Processing RSS News |
|
|
|
3 |
5,808 |
UNIX and Linux Applications |
|
|
|
6 |
10,011 |
Solaris |
|
|
|
0 |
2,311 |
Cartoons for Geeks |
|
|
|
0 |
1,791 |
Cartoons for Geeks |
|
|
|
2 |
5,082 |
OS X (Apple) |
|
|
|
3 |
2,210 |
Shell Programming and Scripting |
|
|
|
0 |
1,046 |
Software Releases - RSS News |
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)