X-Git-Url: http://git.rot13.org/?a=blobdiff_plain;f=misc%2FbatchImportMARCWithBiblionumbers.pl;h=4acc02b116823d8fe76f1b24c7ce944200e23d5a;hb=0d480bbf5cd7c392c1937fe29c7f7bd4e5fe3fc8;hp=893d988a76de67328c3a30e607b653f76f31c192;hpb=dd3f557f53f01dd6f5db51c044d792974e547720;p=koha.git diff --git a/misc/batchImportMARCWithBiblionumbers.pl b/misc/batchImportMARCWithBiblionumbers.pl index 893d988a76..4acc02b116 100755 --- a/misc/batchImportMARCWithBiblionumbers.pl +++ b/misc/batchImportMARCWithBiblionumbers.pl @@ -2,6 +2,7 @@ # load records that already have biblionumber set into a koha system # Written by TG on 10/04/2006 use strict; +#use warnings; FIXME - Bug 2505 BEGIN { # find Koha's Perl modules # test carefully before changing this @@ -19,6 +20,8 @@ use MARC::File::XML; use MARC::Batch; use Time::HiRes qw(gettimeofday); use Getopt::Long; +use IO::File; + my $input_marc_file = ''; my ($version); GetOptions( @@ -45,7 +48,8 @@ my $timeneeded; my $dbh = C4::Context->dbh; my $sth2=$dbh->prepare("update biblioitems set marc=? where biblionumber=?"); -my $batch = MARC::Batch->new( 'USMARC', $input_marc_file ); +my $fh = IO::File->new($input_marc_file); # don't let MARC::Batch open the file, as it applies the ':utf8' IO layer +my $batch = MARC::Batch->new( 'USMARC', $fh ); $batch->warnings_off(); $batch->strict_off(); my ($tagfield,$biblionumtagsubfield) = &GetMarcFromKohaField("biblio.biblionumber","");