From: Moritz Bunkus Date: Mon, 3 Jan 2011 14:48:07 +0000 (+0100) Subject: FCGI-Fix für Charset-Encoding nur bei UTF-8-Installationen anwenden X-Git-Tag: release-2.6.2beta1~6^2~7 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=c203c637d9fe864964b1e8e7548118dafcaf3d22;p=kivitendo-erp.git FCGI-Fix für Charset-Encoding nur bei UTF-8-Installationen anwenden Andernfalls würden ISO-encodierte Strings vom Fix nochmal nach UTF-8 encodiert und danach erst ausgeliefert. --- 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;