Treat SRU queries as UTF8 input.
authordbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 30 Jun 2009 02:56:54 +0000 (02:56 +0000)
committerdbs <dbs@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Tue, 30 Jun 2009 02:56:54 +0000 (02:56 +0000)
Resolves a problem whereby any non-ASCII input in SRU queries resulted in searches for corrupted strings (and consequently 0 hits)

git-svn-id: svn://svn.open-ils.org/ILS/trunk@13486 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/WWW/SuperCat.pm

index 55d54c0..5057f6e 100644 (file)
@@ -1618,8 +1618,8 @@ sub sru_search {
        my ($shortname, $holdings) = $url =~ m#/?([^/]*)(/holdings)?#;
 
        if ( $resp->type eq 'searchRetrieve' ) {
-               my $cql_query = $req->query;
-               my $search_string = $req->cql->toEvergreen;
+               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:#) {