From 5ab97a89a4dad2f892c0cfdeadd1d143e3d1b578 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sven=20Sch=C3=B6ling?= Date: Tue, 20 Jul 2010 11:06:11 +0200 Subject: [PATCH] =?utf8?q?STDOUT=20erneut=20=C3=B6ffnen=20unt=20UTF8-Flag?= =?utf8?q?=20und=20FastCGI=20gefixt?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Conflicts: SL/Form.pm --- SL/Form.pm | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) 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); -- 2.20.1