r730@llin: dpavlin | 2006-06-29 21:33:48 +0200
[webpac2] / run.pl
diff --git a/run.pl b/run.pl
index 64e8095..6bb258f 100755 (executable)
--- a/run.pl
+++ b/run.pl
@@ -19,7 +19,7 @@ use Getopt::Long;
 use File::Path;
 use Time::HiRes qw/time/;
 use File::Slurp;
-use MARC::Record;
+use MARC::Record 2.0;  # need 2.0 for utf-8 encoding see marcpm.sf.net
 
 =head1 NAME
 
@@ -269,6 +269,7 @@ while (my ($database, $db_config) = each %{ $config->{databases} }) {
                                        row => $row,
                                        rules => $rules,
                                        lookup => $lookup ? $lookup->lookup_hash : undef,
+                                       marc_encoding => 'utf-8',
                                );
 
                                $db->save_ds(
@@ -285,6 +286,7 @@ while (my ($database, $db_config) = each %{ $config->{databases} }) {
 
                                if ($marc_fh) {
                                        my $marc = new MARC::Record;
+                                       $marc->encoding( 'utf-8' );
                                        $marc->add_fields( WebPAC::Normalize::_get_marc21_fields() );
                                        print $marc_fh $marc->as_usmarc;
                                }