use base qw/WebPAC::Common/;
use Text::CSV;
+use Encode;
use Data::Dump qw/dump/;
=head1 NAME
=cut
-our $VERSION = '0.01';
+our $VERSION = '0.02';
=head1 FUNCTIONS
my $log = $self->_get_logger();
- open( my $fh, '<:encoding(utf-8)', $arg->{path} ) || $log->logconfess("can't open $arg->{path}: $!");
+ open( my $fh, '<:raw', $arg->{path} ) || $log->logconfess("can't open $arg->{path}: $!");
my $csv = Text::CSV->new({ binary => 1 });
$rec->{'000'} = [ ++$self->{size} ];
my $col = 'A';
- $rec->{ $col++ } = $_ foreach @$line;
+ $rec->{ $col++ } = Encode::decode_utf8( $_ ) foreach @$line;
push @{ $self->{_rec} }, $rec;
=cut
sub fetch_rec {
- my $self = shift;
-
- my ( $mfn, $filter_coderef ) = @_;
+ my ( $self, $mfn, $filter_coderef ) = @_;
return $self->{_rec}->[$mfn-1];
}