From: dbs Date: Tue, 16 Feb 2010 17:03:40 +0000 (+0000) Subject: Backport r15554 from trunk: Double-decoding the UTF8 for SRU no longer seems necessar... X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=720919bcbafe672678ff87c43099c2a0729bad4e;p=working%2FEvergreen.git Backport r15554 from trunk: Double-decoding the UTF8 for SRU no longer seems necessary with current Debian Lenny packages git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_6@15555 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm b/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm index 3a386919e5..184531cb4b 100644 --- a/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm +++ b/Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm @@ -1641,12 +1641,12 @@ sub sru_search { if ( $resp->type eq 'searchRetrieve' ) { - # These terms are arriving to us double-encoded, so until we - # figure out where in the CGI/SRU chain that's happening, we - # have to # forcefully double-decode them a second time with - # the outer decode('utf8', $string) call - my $cql_query = decode('utf8', decode_utf8($req->query)); - my $search_string = decode('utf8', decode_utf8($req->cql->toEvergreen)); + # Older versions of Debian packages returned terms to us double-encoded, + # so we had to forcefully double-decode them a second time with + # an outer decode('utf8', $string) call; this seems to be resolved with + # Debian Lenny packages sometime between 2009-07-27 and 2010-02-15 + my $cql_query = decode_utf8($req->query); + my $search_string = decode_utf8($req->cql->toEvergreen); # Ensure the search string overrides the default site if ($shortname and $search_string !~ m#site:#) {