Created attachment 36763 [details] [review] Bug 13815 - plack loose CGI qw(-utf8) flag creating incorrect utf-8 encoding everywhere This is major problem for plack installations with utf-8 encoding. In this case, we are overriding CGI->new to setup utf-8 flag and get correctly decoded $cgi->params, and reset syspref cache using C4::Context->clear_syspref_cache Test scenario: 1. under plack try to search with utf-8 charactes 2. try to find patron with utf-8 characters
Hi Dobrica, I get the problem on the patron search, but not on searching biblios. IMO we should remove the warns in the psgi file, don't you think?
Sure, this is just a quick code drop. I think that my production in now ready to be updated to master with plack. I also need to suppress warning.
Created attachment 36944 [details] [review] Bug 13815 - plack loose CGI qw(-utf8) flag creating incorrect utf-8 encoding everywhere This is major problem for plack installations with utf-8 encoding. In this case, we are overriding CGI->new to setup utf-8 flag and get correctly decoded $cgi->params, and reset syspref cache using C4::Context->clear_syspref_cache Test scenario: 1. under plack try to search with utf-8 charactes 2. try to find patron with utf-8 characters
Created attachment 38162 [details] [review] [SIGNED-OFF] Bug 13815 - plack loose CGI qw(-utf8) flag creating incorrect utf-8 encoding everywhere This is major problem for plack installations with utf-8 encoding. In this case, we are overriding CGI->new to setup utf-8 flag and get correctly decoded $cgi->params, and reset syspref cache using C4::Context->clear_syspref_cache Test scenario: 1. under plack try to search with utf-8 charactes 2. try to find patron with utf-8 characters Signed-off-by: Gaetan Boisson <gaetan.boisson@biblibre.com>
Works and solved a large number of issues for us! Is the syspref cache clearing also involved in encoding problems?
Created attachment 39865 [details] [review] Bug 13815 - plack loose CGI qw(-utf8) flag creating incorrect utf-8 encoding everywhere This is major problem for plack installations with utf-8 encoding. In this case, we are overriding CGI->new to setup utf-8 flag and get correctly decoded $cgi->params, and reset syspref cache using C4::Context->clear_syspref_cache Test scenario: 1. under plack try to search with utf-8 charactes 2. try to find patron with utf-8 characters Signed-off-by: Gaetan Boisson <gaetan.boisson@biblibre.com> Signed-off-by: Jonathan Druart <jonathan.druart@koha-community.org>
Patch pushed to master. Thanks Dobrica!
(In reply to Gaetan Boisson from comment #6) > Works and solved a large number of issues for us! > > Is the syspref cache clearing also involved in encoding problems? Actually you are right, this should not be done here. We should remove this call.
Pushed to 3.20.x will be in 3.20.1
Patch pushed to 3.18.x will be in 3.18.08
(In reply to Liz Rea from comment #11) > Patch pushed to 3.18.x will be in 3.18.08 Liz, this patch should not have been pushed to 3.18.x, it depends on bug 11944 which is only in 3.20. There is at least 1 regression on facets.