From 02c7810e13852bc7bdbaf7cc8b7f448c82907949 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 28 Aug 2015 11:59:26 +0100 Subject: [PATCH] Bug 12478: Fix encoding issue on facets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Filer on "Ślez, Ts." => Can't escape \x{015A}, try uri_escape_utf8() instead at /home/koha/src/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm line 221. --- Koha/SearchEngine/Elasticsearch/QueryBuilder.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm b/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm index bf5154f..ff2f742 100644 --- a/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm +++ b/Koha/SearchEngine/Elasticsearch/QueryBuilder.pm @@ -214,12 +214,12 @@ sub build_query_compat { #die Dumper($query); # We roughly emulate the CGI parameters of the zebra query builder - my $query_cgi = 'idx=kw&q=' . uri_escape( $operands->[0] ) if @$operands; + my $query_cgi = 'idx=kw&q=' . uri_escape_utf8( $operands->[0] ) if @$operands; my $simple_query = $operands->[0] if @$operands == 1; my $query_desc = $simple_query; my $limit = $self->_join_queries( $self->_convert_index_strings(@$limits)); my $limit_cgi = - '&limit=' . join( '&limit=', map { uri_escape($_) } @$orig_limits ); + '&limit=' . join( '&limit=', map { uri_escape_utf8($_) } @$orig_limits ); my $limit_desc = "$limit" if $limit; return ( undef, $query, $simple_query, $query_cgi, $query_desc, -- 2.1.0