open files in UTF-8 mode to help MARC::Batch
authorMike Rylander <miker@esilibrary.com>
Fri, 1 Aug 2008 15:12:15 +0000 (15:12 +0000)
committerMike Rylander <miker@esilibrary.com>
Fri, 1 Aug 2008 15:12:15 +0000 (15:12 +0000)
dump_inverse_select_marc.pl
fingerprints.pl
select_marc.pl
spit_csv.pl
spit_tlc_marc_holdings.pl
spit_unicorn_marc_holdings.pl
trim_marc_based_on_tag_subfield_value.pl

index 666d567..249cad5 100755 (executable)
@@ -21,11 +21,15 @@ my $id_tag = $ARGV[2]; my $id_subfield = $ARGV[3];
 binmode(STDOUT, ':utf8');
 binmode(STDIN, ':utf8');
 
+my $M;
+
 foreach $argnum ( 4 .. $#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();
 
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();
 
index 397f763..cbd7fd9 100755 (executable)
@@ -19,11 +19,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();
 
index 339ec2f..fbf29e9 100755 (executable)
@@ -20,7 +20,10 @@ foreach my $argnum ( 0 .. 0 ) {
 
        print STDERR "Processing " . $ARGV[$argnum] . "\n";
 
-       my $batch = MARC::Batch->new('XML',$ARGV[$argnum]);
+    my $M;
+    open $M, '<:utf8', $ARGV[$argnum];
+    my $batch = MARC::Batch->new('XML',$M);
+
        $batch->strict_off();
        $batch->warnings_off();
 
index bf783ad..c1a0559 100755 (executable)
@@ -35,7 +35,10 @@ foreach my $argnum ( 0 .. $#ARGV ) {
 
        print STDERR "Processing " . $ARGV[$argnum] . "\n";
 
-       my $batch = MARC::Batch->new('XML',$ARGV[$argnum]);
+    my $M;
+    open $M, '<:utf8', $ARGV[$argnum];
+    my $batch = MARC::Batch->new('XML',$M);
+
        $batch->strict_off();
        $batch->warnings_off();
 
index a897e63..c99d1a1 100755 (executable)
@@ -30,7 +30,10 @@ foreach my $argnum ( 0 .. $#ARGV ) {
 
        print STDERR "Processing " . $ARGV[$argnum] . "\n";
 
-       my $batch = MARC::Batch->new('XML',$ARGV[$argnum]);
+    my $M;
+    open $M, '<:utf8', $ARGV[$argnum];
+    my $batch = MARC::Batch->new('XML',$M);
+
        $batch->strict_off();
        $batch->warnings_off();
 
index 841676a..b7ba249 100755 (executable)
@@ -19,7 +19,10 @@ foreach $argnum ( 3 .. $#ARGV ) {
 
        print STDERR "Processing " . $ARGV[$argnum] . "\n";
 
-       my $batch = MARC::Batch->new('XML',$ARGV[$argnum]);
+    my $M;
+    open $M, '<:utf8', $ARGV[$argnum];
+    my $batch = MARC::Batch->new('XML',$M);
+
        $batch->strict_off();
        $batch->warnings_off();