Spreadsheet-Edit
view release on metacpan or search on metacpan
lib/Spreadsheet/Edit/IO.pm view on Meta::CPAN
binmode($fh); # unnecessary???
binmode($fh, ":raw:encoding($bomenc):crlf") or die "binmode: $!";
}
#_dump_fh("CCC final");
}
my sub determine_input_encoding() {
# If one encoding was specified by the user or implied by a BOM, use it;
# otherwise try multiple encodings specified by the user or defaulted
# until one seems to work.
$opts->{input_encoding} //= $default_input_encodings;
my @enclist = split m#,#, $opts->{input_encoding};
return
if @enclist == 1;
_slurp_ifnotslurped($fh, $ref2octets, $debug);
for my $enc (@enclist) {
eval { _decode_slurped_data($enc, $ref2octets, $start_pos) };
if ($@) {
btw "Input encoding '$enc' did not work...($@)\n" if $debug;
next;
}
( run in 0.841 second using v1.01-cache-2.11-cpan-71847e10f99 )