Bug 21142: Open uploaded files in utf-8 - batch mod/del
[koha.git] / tools / batch_record_modification.pl
index bfdb758..2b76084 100755 (executable)
@@ -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]*$//;