projects
/
koha.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bug 20647: (alternate) When ILL is enabled the hover effect on the ILL requests butto...
[koha.git]
/
misc
/
batchCompareMARCvsFrameworks.pl
diff --git
a/misc/batchCompareMARCvsFrameworks.pl
b/misc/batchCompareMARCvsFrameworks.pl
index
0b806f0
..
9bbcde4
100755
(executable)
--- a/
misc/batchCompareMARCvsFrameworks.pl
+++ b/
misc/batchCompareMARCvsFrameworks.pl
@@
-3,6
+3,7
@@
use strict;
use strict;
+#use warnings; FIXME - Bug 2505
BEGIN {
# find Koha's Perl modules
# test carefully before changing this
BEGIN {
# find Koha's Perl modules
# test carefully before changing this
@@
-17,6
+18,8
@@
use MARC::Record;
use MARC::Batch;
use Getopt::Long;
use MARC::Batch;
use Getopt::Long;
+use IO::File;
+
my ( $input_marc_file,$number,$nowarning,$frameworkcode) = ('',0);
my $version;
GetOptions(
my ( $input_marc_file,$number,$nowarning,$frameworkcode) = ('',0);
my $version;
GetOptions(
@@
-49,7
+52,8
@@
EOF
die;
}#/
die;
}#/
-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() unless $nowarning;
$batch->strict_off() unless $nowarning;
my $dbh=C4::Context->dbh;
$batch->warnings_off() unless $nowarning;
$batch->strict_off() unless $nowarning;
my $dbh=C4::Context->dbh;
@@
-66,7
+70,7
@@
my $i=0;
while ( my $record = $batch->next() ) {
$i++;
foreach my $MARCfield ($record->fields()) {
while ( my $record = $batch->next() ) {
$i++;
foreach my $MARCfield ($record->fields()) {
- next if $MARCfield->
tag()<=010;
+ next if $MARCfield->
is_control_field(); # tag num < 10
if ($MARCfield) {
foreach my $fields ($MARCfield->subfields()) {
if ($fields) {
if ($MARCfield) {
foreach my $fields ($MARCfield->subfields()) {
if ($fields) {