From c203c637d9fe864964b1e8e7548118dafcaf3d22 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Mon, 3 Jan 2011 15:48:07 +0100 Subject: [PATCH] =?utf8?q?FCGI-Fix=20f=C3=BCr=20Charset-Encoding=20nur=20b?= =?utf8?q?ei=20UTF-8-Installationen=20anwenden?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Andernfalls würden ISO-encodierte Strings vom Fix nochmal nach UTF-8 encodiert und danach erst ausgeliefert. --- SL/FCGIFixes.pm | 1 + dispatcher.fpl | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/SL/FCGIFixes.pm b/SL/FCGIFixes.pm index 47393aad6..d341f4a97 100644 --- a/SL/FCGIFixes.pm +++ b/SL/FCGIFixes.pm @@ -25,6 +25,7 @@ use version; sub fix_print_and_internal_encoding_after_0_68 { return if version->new("$FCGI::VERSION")->numify <= version->new("0.68")->numify; + return if lc($::dbcharset) !~ m/^(?:utf-?8|unicode)$/; my $encoder = Encode::find_encoding('UTF-8'); my $original_fcgi_print = \&FCGI::Stream::PRINT; diff --git a/dispatcher.fpl b/dispatcher.fpl index ba5f288d1..7d2dfb5be 100755 --- a/dispatcher.fpl +++ b/dispatcher.fpl @@ -6,10 +6,10 @@ use FCGI; use SL::Dispatcher; use SL::FCGIFixes; -SL::FCGIFixes::apply_fixes(); - our $dispatcher = SL::Dispatcher->new('FastCGI'); -$dispatcher->pre_startup; +$dispatcher->pre_startup_setup; +SL::FCGIFixes::apply_fixes(); +$dispatcher->pre_startup_checks; my $request = FCGI::Request(); $dispatcher->handle_request($request) while $request->Accept() >= 0; -- 2.20.1