@@ -, +, @@ characters --- C4/Output.pm | 2 ++ C4/Search.pm | 4 ++++ 2 files changed, 6 insertions(+) --- a/C4/Output.pm +++ a/C4/Output.pm @@ -28,6 +28,7 @@ package C4::Output; use strict; #use warnings; FIXME - Bug 2505 +use Encode qw( encode ); use URI::Escape; use C4::Context; @@ -275,6 +276,7 @@ caching whatsoever. sub output_with_http_headers { my ( $query, $cookie, $data, $content_type, $status, $extra_options ) = @_; + binmode( STDOUT, ":encoding(utf8)" ); $status ||= '200 OK'; $extra_options //= {}; --- a/C4/Search.pm +++ a/C4/Search.pm @@ -493,6 +493,7 @@ sub getRecords { # not an index scan else { $record = $results[ $i - 1 ]->record($j)->raw(); + Encode::decode('UTF-8', $record ); # warn "RECORD $j:".$record; $results_hash->{'RECORDS'}[$j] = $record; } @@ -519,6 +520,8 @@ sub getRecords { next; } + Encode::decode('UTF-8', $marc_record); + my @used_datas = (); foreach my $tag ( @{ $facet->{tags} } ) { @@ -720,6 +723,7 @@ sub pazGetRecords { for (my $i = 0; $i < $count; $i++) { # FIXME -- may need to worry about diacritics here my $rec = $paz->record($recid, $i); + Encode::decode('UTF-8', $rec ); push @{ $result_group->{'RECORDS'} }, $rec; } --