X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FFCGIFixes.pm;h=6327ffcf16a95585305a695d24b0bf80289db290;hb=89c9ff022d3f13e27ba6bda085df15707fcfb0eb;hp=2bd312c9e8c24f64107870e4b4ca031fec576dd7;hpb=90edf0b1ddcc2aa9ee7cdeb9b46e1ccbea6b0006;p=kivitendo-erp.git diff --git a/SL/FCGIFixes.pm b/SL/FCGIFixes.pm index 2bd312c9e..6327ffcf1 100644 --- a/SL/FCGIFixes.pm +++ b/SL/FCGIFixes.pm @@ -4,6 +4,7 @@ use strict; use Encode; use FCGI; +use version; # FCGI does not use Perl's I/O layer. Therefore it does not honor # setting STDOUT to ":utf8" with "binmode". Also FCGI starting with @@ -23,7 +24,8 @@ use FCGI; # that current I/O operations should be raw. sub fix_print_and_internal_encoding_after_0_68 { - return if version->parse($FCGI::VERSION) <= version->parse("0.68"); + return if version->new("$FCGI::VERSION")->numify <= version->new("0.68")->numify; + return if lc($::lx_office_conf{system}->{dbcharset}) !~ m/^(?:utf-?8|unicode)$/; my $encoder = Encode::find_encoding('UTF-8'); my $original_fcgi_print = \&FCGI::Stream::PRINT;