From: Sven Schöling Date: Tue, 20 Jul 2010 09:06:11 +0000 (+0200) Subject: STDOUT erneut öffnen unt UTF8-Flag und FastCGI gefixt X-Git-Tag: release-2.6.2beta1~281 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=5ab97a89a4dad2f892c0cfdeadd1d143e3d1b578;p=kivitendo-erp.git STDOUT erneut öffnen unt UTF8-Flag und FastCGI gefixt Conflicts: SL/Form.pm --- diff --git a/SL/Form.pm b/SL/Form.pm index bf9deb4ba..6fa51321a 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -1336,8 +1336,11 @@ sub parse_template { #print(STDERR "OUT $self->{OUT}\n"); for my $i (1 .. $self->{copies}) { if ($self->{OUT}) { - open(OUT, $self->{OUT}) - or $self->error($self->cleanup . "$self->{OUT} : $!"); + open OUT, $self->{OUT} or $self->error($self->cleanup . "$self->{OUT} : $!"); + print OUT while ; + close OUT; + seek IN, 0, 0; + } else { $self->{attachment_filename} = ($self->{attachment_filename}) ? $self->{attachment_filename} @@ -1350,18 +1353,8 @@ Content-Length: $numbytes |; - open(OUT, ">-") or $self->error($self->cleanup . "$!: STDOUT"); - - } - - while () { - print OUT $_; - + $::locale->with_raw_io(\*STDOUT, sub { print while }); } - - close(OUT); - - seek IN, 0, 0; } close(IN);