open files in UTF-8 mode to help MARC::Batch
[migration-tools.git] / fingerprints.pl
index ff2d1a9..31301e1 100755 (executable)
@@ -12,11 +12,15 @@ my $id_tag = $ARGV[1]; my $id_subfield = $ARGV[2];
 binmode(STDOUT, ':utf8');
 binmode(STDIN, ':utf8');
 
+my $M;
+
 foreach $argnum ( 3 .. $#ARGV ) {
 
        print STDERR "Processing " . $ARGV[$argnum] . "\n";
 
-       my $batch = MARC::Batch->new('XML',$ARGV[$argnum]);
+    open $M, '<:utf8', $ARGV[$argnum];
+
+       my $batch = MARC::Batch->new('XML',$M);
        $batch->strict_off();
        $batch->warnings_off();