Lines 484-489
sub getRecords {
Link Here
|
484 |
# not an index scan |
484 |
# not an index scan |
485 |
else { |
485 |
else { |
486 |
$record = $results[ $i - 1 ]->record($j)->raw(); |
486 |
$record = $results[ $i - 1 ]->record($j)->raw(); |
|
|
487 |
utf8::decode( $record ); |
487 |
|
488 |
|
488 |
# warn "RECORD $j:".$record; |
489 |
# warn "RECORD $j:".$record; |
489 |
$results_hash->{'RECORDS'}[$j] = $record; |
490 |
$results_hash->{'RECORDS'}[$j] = $record; |
Lines 501-506
sub getRecords {
Link Here
|
501 |
for ( my $j = 0 ; $j < $jmax ; $j++ ) { |
502 |
for ( my $j = 0 ; $j < $jmax ; $j++ ) { |
502 |
my $render_record = |
503 |
my $render_record = |
503 |
$results[ $i - 1 ]->record($j)->render(); |
504 |
$results[ $i - 1 ]->record($j)->render(); |
|
|
505 |
utf8::decode($render_record); |
504 |
my @used_datas = (); |
506 |
my @used_datas = (); |
505 |
foreach my $tag ( @{ $facet->{tags} } ) { |
507 |
foreach my $tag ( @{ $facet->{tags} } ) { |
506 |
|
508 |
|
Lines 714-719
sub pazGetRecords {
Link Here
|
714 |
for (my $i = 0; $i < $count; $i++) { |
716 |
for (my $i = 0; $i < $count; $i++) { |
715 |
# FIXME -- may need to worry about diacritics here |
717 |
# FIXME -- may need to worry about diacritics here |
716 |
my $rec = $paz->record($recid, $i); |
718 |
my $rec = $paz->record($recid, $i); |
|
|
719 |
utf8::decode( $rec ); |
717 |
push @{ $result_group->{'RECORDS'} }, $rec; |
720 |
push @{ $result_group->{'RECORDS'} }, $rec; |
718 |
} |
721 |
} |
719 |
|
722 |
|
Lines 1290-1306
sub buildQuery {
Link Here
|
1290 |
if ( @limits ) { |
1293 |
if ( @limits ) { |
1291 |
$q .= ' and '.join(' and ', @limits); |
1294 |
$q .= ' and '.join(' and ', @limits); |
1292 |
} |
1295 |
} |
1293 |
return ( undef, $q, $q, "q=ccl=".uri_escape($q), $q, '', '', '', '', 'ccl' ); |
1296 |
return ( undef, $q, $q, "q=ccl=".uri_escape_utf8($q), $q, '', '', '', '', 'ccl' ); |
1294 |
} |
1297 |
} |
1295 |
if ( $query =~ /^cql=/ ) { |
1298 |
if ( $query =~ /^cql=/ ) { |
1296 |
return ( undef, $', $', "q=cql=".uri_escape($'), $', '', '', '', '', 'cql' ); |
1299 |
return ( undef, $', $', "q=cql=".uri_escape_utf8($'), $', '', '', '', '', 'cql' ); |
1297 |
} |
1300 |
} |
1298 |
if ( $query =~ /^pqf=/ ) { |
1301 |
if ( $query =~ /^pqf=/ ) { |
1299 |
if ($query_desc) { |
1302 |
if ($query_desc) { |
1300 |
$query_cgi = "q=".uri_escape($query_desc); |
1303 |
$query_cgi = "q=".uri_escape_utf8($query_desc); |
1301 |
} else { |
1304 |
} else { |
1302 |
$query_desc = $'; |
1305 |
$query_desc = $'; |
1303 |
$query_cgi = "q=pqf=".uri_escape($'); |
1306 |
$query_cgi = "q=pqf=".uri_escape_utf8($'); |
1304 |
} |
1307 |
} |
1305 |
return ( undef, $', $', $query_cgi, $query_desc, '', '', '', '', 'pqf' ); |
1308 |
return ( undef, $', $', $query_cgi, $query_desc, '', '', '', '', 'pqf' ); |
1306 |
} |
1309 |
} |
Lines 1472-1480
sub buildQuery {
Link Here
|
1472 |
$query .= " $operators[$i-1] "; |
1475 |
$query .= " $operators[$i-1] "; |
1473 |
$query .= " $index_plus " unless $indexes_set; |
1476 |
$query .= " $index_plus " unless $indexes_set; |
1474 |
$query .= " $operand"; |
1477 |
$query .= " $operand"; |
1475 |
$query_cgi .= "&op=".uri_escape($operators[$i-1]); |
1478 |
$query_cgi .= "&op=".uri_escape_utf8($operators[$i-1]); |
1476 |
$query_cgi .= "&idx=".uri_escape($index) if $index; |
1479 |
$query_cgi .= "&idx=".uri_escape_utf8($index) if $index; |
1477 |
$query_cgi .= "&q=".uri_escape($operands[$i]) if $operands[$i]; |
1480 |
$query_cgi .= "&q=".uri_escape_utf8($operands[$i]) if $operands[$i]; |
1478 |
$query_desc .= |
1481 |
$query_desc .= |
1479 |
" $operators[$i-1] $index_plus $operands[$i]"; |
1482 |
" $operators[$i-1] $index_plus $operands[$i]"; |
1480 |
} |
1483 |
} |
Lines 1484-1491
sub buildQuery {
Link Here
|
1484 |
$query .= " and "; |
1487 |
$query .= " and "; |
1485 |
$query .= "$index_plus " unless $indexes_set; |
1488 |
$query .= "$index_plus " unless $indexes_set; |
1486 |
$query .= "$operand"; |
1489 |
$query .= "$operand"; |
1487 |
$query_cgi .= "&op=and&idx=".uri_escape($index) if $index; |
1490 |
$query_cgi .= "&op=and&idx=".uri_escape_utf8($index) if $index; |
1488 |
$query_cgi .= "&q=".uri_escape($operands[$i]) if $operands[$i]; |
1491 |
$query_cgi .= "&q=".uri_escape_utf8($operands[$i]) if $operands[$i]; |
1489 |
$query_desc .= " and $index_plus $operands[$i]"; |
1492 |
$query_desc .= " and $index_plus $operands[$i]"; |
1490 |
} |
1493 |
} |
1491 |
} |
1494 |
} |
Lines 1497-1504
sub buildQuery {
Link Here
|
1497 |
$query .= " $index_plus " unless $indexes_set; |
1500 |
$query .= " $index_plus " unless $indexes_set; |
1498 |
$query .= $operand; |
1501 |
$query .= $operand; |
1499 |
$query_desc .= " $index_plus $operands[$i]"; |
1502 |
$query_desc .= " $index_plus $operands[$i]"; |
1500 |
$query_cgi .= "&idx=".uri_escape($index) if $index; |
1503 |
$query_cgi .= "&idx=".uri_escape_utf8($index) if $index; |
1501 |
$query_cgi .= "&q=".uri_escape($operands[$i]) if $operands[$i]; |
1504 |
$query_cgi .= "&q=".uri_escape_utf8($operands[$i]) if $operands[$i]; |
1502 |
$previous_operand = 1; |
1505 |
$previous_operand = 1; |
1503 |
} |
1506 |
} |
1504 |
} #/if $operands |
1507 |
} #/if $operands |