[Bug 15818] New: OPAC search with utf-8 characters and without results generates encoding error
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15818 Bug ID: 15818 Summary: OPAC search with utf-8 characters and without results generates encoding error Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: Searching Assignee: gmcharlt@gmail.com Reporter: dpavlin@rot13.org QA Contact: testopia@bugs.koha-community.org When searching for something in OPAC which doesn't result in any results we get following encoding error: Cannot decode string with wide characters at /usr/lib/i386-linux-gnu/perl5/5.20/Encode.pm line 215. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15818 Dobrica Pavlinusic <dpavlin@rot13.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15818 --- Comment #1 from Dobrica Pavlinusic <dpavlin@rot13.org> --- Created attachment 48050 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=48050&action=edit Bug 15818 - OPAC search with utf-8 characters and without results generates encoding error When searching for something in OPAC which doesn't result in any results but have utf-8 characters in search string we get following encoding error: Cannot decode string with wide characters at /usr/lib/i386-linux-gnu/perl5/5.20/Encode.pm line 215. This is because we are trying to decode string which is allready correctly marked as utf-8. Test scenario: 1) enter search string with utf-8 characters in opac which doesn't return any results 2) verify that you get application error 3) apply this patch 4) re-run query and verify that errror is gone -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15818 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15818 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #48050|0 |1 is obsolete| | --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 48051 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=48051&action=edit Bug 15818 - OPAC search with utf-8 characters and without results generates encoding error When searching for something in OPAC which doesn't result in any results but have utf-8 characters in search string we get following encoding error: Cannot decode string with wide characters at /usr/lib/i386-linux-gnu/perl5/5.20/Encode.pm line 215. This is because we are trying to decode string which is allready correctly marked as utf-8. Test scenario: 1) enter search string with utf-8 characters in opac which doesn't return any results 2) verify that you get application error 3) apply this patch 4) re-run query and verify that errror is gone Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Step 0: Define "OPACNoResultsFound" with '{QUERY_KW}' Note that I don't get the error (Encode 2.60) but the search terms are not display correctly. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15818 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|gmcharlt@gmail.com |dpavlin@rot13.org Depends on| |11944 CC| |jonathan.druart@bugs.koha-c | |ommunity.org Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=11944 [Bug 11944] Cleanup Koha UTF-8 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15818 --- Comment #3 from Dobrica Pavlinusic <dpavlin@rot13.org> --- Jonathan, I'm wondering do you have libencode-perl package installed or are you using Encode which ships with perl (and which version?). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15818 --- Comment #4 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- % dpkg -l | grep libencode-perl Does not return anything and % pmpath Encode /usr/lib/i386-linux-gnu/perl/5.20/Encode.pm % pmvers Encode 2.60 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15818 --- Comment #5 from Dobrica Pavlinusic <dpavlin@rot13.org> --- Interesting. I have libencode-perl which is 2.63 and I do get application error. I guess that built-in Encode is less strict, but anyway, this patch helps :-) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15818 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15818 --- Comment #6 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Cannot reproduce this with Encode 2.42 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15818 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15818 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #48051|0 |1 is obsolete| | --- Comment #7 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 48225 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=48225&action=edit Bug 15818 - OPAC search with utf-8 characters and without results generates encoding error When searching for something in OPAC which doesn't result in any results but have utf-8 characters in search string we get following encoding error: Cannot decode string with wide characters at /usr/lib/i386-linux-gnu/perl5/5.20/Encode.pm line 215. This is because we are trying to decode string which is allready correctly marked as utf-8. Test scenario: 1) enter search string with utf-8 characters in opac which doesn't return any results 2) verify that you get application error 3) apply this patch 4) re-run query and verify that errror is gone Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Step 0: Define "OPACNoResultsFound" with '{QUERY_KW}' Note that I don't get the error (Encode 2.60) but the search terms are not display correctly. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> The variable to be decoded comes from already decoded vars (via the -utf8 flag from CGI), following the trail in Search.pm. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15818 Brendan Gallagher <brendan@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |brendan@bywatersolutions.co | |m Status|Passed QA |Pushed to Master --- Comment #8 from Brendan Gallagher <brendan@bywatersolutions.com> --- pushed to master - should be in the may 2016 release. thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15818 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |julian.maurice@biblibre.com --- Comment #9 from Julian Maurice <julian.maurice@biblibre.com> --- Patch pushed to 3.22.x, will be in 3.22.4 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15818 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |frederic@tamil.fr --- Comment #10 from Frédéric Demians <frederic@tamil.fr> --- This patch has been pushed to 3.20.x, will be in 3.20.8. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org