@@ -, +, @@ --- misc/plack/koha.psgi | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-) --- a/misc/plack/koha.psgi +++ a/misc/plack/koha.psgi @@ -5,6 +5,21 @@ use lib qw( ./lib ); use Plack::Middleware::Debug; use Plack::App::Directory; +use CGI qw(-utf8 ); # we will loose -utf8 under plack +{ + my $old_new = \&CGI::new; + *CGI::new = sub { + warn "# override CGI->new\n"; + my $q = $old_new->( @_ ); + if ( ! $CGI::PARAM_UTF8 ) { + warn "# CGI->new -utf8 = ",$CGI::PARAM_UTF8; + $CGI::PARAM_UTF8 = 1; + } + C4::Context->clear_syspref_cache(); + return $q; + }; +} + BEGIN { # override configuration from startup script below: --