Advertisement
Guest User

Encoding issue in 3.18.x

a guest
Sep 23rd, 2015
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.88 KB | None | 0 0
  1. diff --git a/tools/batchMod.pl b/tools/batchMod.pl
  2. index 1145f9b..67d66ef 100755
  3. --- a/tools/batchMod.pl
  4. +++ b/tools/batchMod.pl
  5. @@ -34,6 +34,7 @@ use C4::ClassSource;
  6.  use C4::Dates;
  7.  use C4::Debug;
  8.  use C4::Members;
  9. +use Encode;
  10.  use MARC::File::XML;
  11.  use List::MoreUtils qw/uniq/;
  12.  
  13. @@ -389,6 +390,8 @@ foreach my $tag (sort keys %{$tagslib}) {
  14.            push @authorised_values, ""; # unless ( $tagslib->{$tag}->{$subfield}->{mandatory} );
  15.            $authorised_values_sth->execute( $tagslib->{$tag}->{$subfield}->{authorised_value}, $branch_limit ? $branch_limit : () );
  16.            while ( my ( $value, $lib ) = $authorised_values_sth->fetchrow_array ) {
  17. +              $value = Encode::encode('utf-8', $value);
  18. +              $lib = Encode::encode('utf-8', $lib);
  19.                push @authorised_values, $value;
  20.                $authorised_lib{$value} = $lib;
  21.            }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement