diff --git a/misc/plack/koha.psgi b/misc/plack/koha.psgi index 7acb5677c4..a35eb77d0f 100644 --- a/misc/plack/koha.psgi +++ b/misc/plack/koha.psgi @@ -5,6 +5,18 @@ use lib qw( ./lib ); use Plack::Middleware::Debug; use Plack::App::Directory; +use CGI qw(-utf8 ); # we will loose -utf8 under plack +{ + no warnings 'redefine'; + my $old_new = \&CGI::new; + *CGI::new = sub { + my $q = $old_new->( @_ ); + $CGI::PARAM_UTF8 = 1; + C4::Context->clear_syspref_cache(); + return $q; + }; +} + BEGIN { # override configuration from startup script below: