diff --git a/tools/batchMod.pl b/tools/batchMod.pl index d941ef3b69..7fbfd43da2 100755 --- a/tools/batchMod.pl +++ b/tools/batchMod.pl @@ -238,6 +238,7 @@ if ($op eq "show"){ my @contentlist; if ($filefh){ + binmode $filefh, ':encoding(UTF-8)'; while (my $content=<$filefh>){ $content =~ s/[\r\n]*$//; push @contentlist, $content if $content; diff --git a/tools/batch_delete_records.pl b/tools/batch_delete_records.pl index 8804e6292a..149b44ddc0 100755 --- a/tools/batch_delete_records.pl +++ b/tools/batch_delete_records.pl @@ -57,6 +57,7 @@ if ( $op eq 'form' ) { $recordtype = 'biblio'; } elsif ( my $uploadfile = $input->param('uploadfile') ) { # A file of id is given + binmode $uploadfile, ':encoding(UTF-8)'; while ( my $content = <$uploadfile> ) { next unless $content; $content =~ s/[\r\n]*$//; diff --git a/tools/batch_record_modification.pl b/tools/batch_record_modification.pl index bfdb7583f5..2b7608469b 100755 --- a/tools/batch_record_modification.pl +++ b/tools/batch_record_modification.pl @@ -105,6 +105,7 @@ if ( $op eq 'form' ) { $recordtype = 'biblio'; } elsif ( my $uploadfile = $input->param('uploadfile') ) { # A file of id is given + binmode $uploadfile, ':encoding(UTF-8)'; while ( my $content = <$uploadfile> ) { next unless $content; $content =~ s/[\r\n]*$//;