[open-ils-commits] r9142 - trunk/Open-ILS/src/perlmods/OpenILS/Application/Search

svn at svn.open-ils.org svn at svn.open-ils.org
Thu Mar 27 00:27:40 EDT 2008


Author: miker
Date: 2008-03-26 23:52:16 -0400 (Wed, 26 Mar 2008)
New Revision: 9142

Modified:
   trunk/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm
Log:
The advanced query syntax parser here was cribbed from the original implemenation inside the OpenSearch server.  mod_perl, due to being too clever by half, required a call to decode_utf8 to shove raw octets into the correct shape.  Becuase the data coming to this implementation comes from opensrf, which is unicode end-to-end via JSON, it's somebody else's job to make sure the characters are properly encoded, and once they get to us they're already proper UTF-8 character strings.  Thus, no need for (and things broken by) the call to decode_utf8.

Why is that explanation so long?  So that we don't do it again ... :)



Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm	2008-03-27 02:29:20 UTC (rev 9141)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Search/Biblio.pm	2008-03-27 03:52:16 UTC (rev 9142)
@@ -453,7 +453,6 @@
     $logger->debug("initial search query => $query");
     my $orig_query = $query;
 
-    $query = decode_utf8($query);
     $query =~ s/\+/ /go;
     $query =~ s/'//go;
     $query =~ s/^\s+//go;



More information about the open-ils-commits mailing list