It certainly depends on the Encode version. To reproduce: 1) /cgi-bin/koha/catalogue/search.pl?q=ééé&op=Submit " No results match your search for 'kw,wrdl: ���' in my library Catalog. " 2) /cgi-bin/koha/catalogue/search.pl?q=ກ Cannot decode string with wide characters at /usr/lib/i386-linux-gnu/perl/5.20/Encode.pm line 215. My encode version is 2.60 (`pmvers Encode`).
Encode version 2.44 (what is in Debian wheezy) is fine.
Created attachment 40456 [details] [review] Bug 14431: FIX encoding issues in search (staff client) Note that this does not appears at the OPAC. We will need 2 different testers here, the results seem to depend on the Encode version. 0/ Determine your Encode version (`pmvers Encode`). If you have 2.60: 1) /cgi-bin/koha/catalogue/search.pl?q=ééé&op=Submit You should get " No results match your search for 'kw,wrdl: ���' in my library Catalog." 2) /cgi-bin/koha/catalogue/search.pl?q=ກ You should get Cannot decode string with wide characters at /usr/lib/i386-linux-gnu/perl/5.20/Encode.pm line 215. If you have <2.60 (? not sure here): 1) /cgi-bin/koha/catalogue/search.pl?q=ééé&op=Submit You should not get encoding problems. 2) /cgi-bin/koha/catalogue/search.pl?q=ກ You should not get encoding problems. Apply this patch, try again 1 and 2. If the Encode version is >=2.60, the encoding issues should be fixed. If not, please detail if there are any regression.
(In reply to Jonathan Druart from comment #2) > 1) /cgi-bin/koha/catalogue/search.pl?q=ééé&op=Submit > You should get > " No results match your search for 'kw,wrdl: ���' in my library Catalog." > 2) /cgi-bin/koha/catalogue/search.pl?q=ກ > You should get > Cannot decode string with wide characters at > /usr/lib/i386-linux-gnu/perl/5.20/Encode.pm line 215. I didn't know about pmvers before, but a sudo apt-get install pmtools solved that. Actually, before the patch, I got similar to this on: - Ubuntu 14.04, Encode 2.57, perl 5.18.2 - Debian 8, Encode 2.63, perl 5.20.2 Before the patch on: - Debian 7, Encode 2.42_01, perl 5.14.2 There were no apparent problems. Given that Chris said it was 2.44, I upgraded my Encode to 2.44 (sudo apt-get install libencode-perl) and retested. After the patch, problems were corrected as expected, and no apparent regressions. Is this sufficient for a sign off? I will sign off, assuming this is. :)
Created attachment 40504 [details] [review] Bug 14431: FIX encoding issues in search (staff client) Note that this does not appears at the OPAC. We will need 2 different testers here, the results seem to depend on the Encode version. 0/ Determine your Encode version (`pmvers Encode`). If you have 2.60: 1) /cgi-bin/koha/catalogue/search.pl?q=ééé&op=Submit You should get " No results match your search for 'kw,wrdl: ���' in my library Catalog." 2) /cgi-bin/koha/catalogue/search.pl?q=ກ You should get Cannot decode string with wide characters at /usr/lib/i386-linux-gnu/perl/5.20/Encode.pm line 215. If you have <2.60 (? not sure here): 1) /cgi-bin/koha/catalogue/search.pl?q=ééé&op=Submit You should not get encoding problems. 2) /cgi-bin/koha/catalogue/search.pl?q=ກ You should not get encoding problems. Apply this patch, try again 1 and 2. If the Encode version is >=2.60, the encoding issues should be fixed. If not, please detail if there are any regression. NOTE: Tested on Ubuntu 14.04, Debian 8, and Debian 7. See comment #3. Signed-off-by: Mark Tompsett <mtompset@hotmail.com>
*** Bug 14286 has been marked as a duplicate of this bug. ***
I can confirm that applying the patch fixes the issue for me (searching for Greek characters was broken in the staff interface). FWIW I'm using koha 3.20 on Ubuntu 15.04 and my Encode.pm is at version 2.60.
Created attachment 40693 [details] [review] [PASSED QA] Bug 14431: FIX encoding issues in search (staff client)
Please add a regression test in t/db_dependent/www/search_utf8.t
(In reply to Tomás Cohen Arazi from comment #8) > Please add a regression test in t/db_dependent/www/search_utf8.t I'd say the existing tests are enough. Could someone confirm? Tomas, looking at http://jenkins.koha-community.org/job/Koha_Master_D7/lastBuild/testReport/%28root%29/ the tests are not launch by jenkins, they should.
(In reply to Jonathan Druart from comment #9) > (In reply to Tomás Cohen Arazi from comment #8) > > Please add a regression test in t/db_dependent/www/search_utf8.t > > I'd say the existing tests are enough. Could someone confirm? > > Tomas, looking at > http://jenkins.koha-community.org/job/Koha_Master_D7/lastBuild/testReport/ > %28root%29/ the tests are not launch by jenkins, they should. You are right, I only set those tests to be run on 14.04 when we pushed them, and left the other VMs 'for later'. I'll try to set it. Sorry for that.
Patch pushed to master. Thanks Jonathan!
Pushed to 3.20.x will be in 3.20.2
*** Bug 14561 has been marked as a duplicate of this bug. ***