From: Darold Gilles Date: Sat, 21 Dec 2013 12:18:28 +0000 (+0100) Subject: Remove calls of binmode to force html file output to be utf8 as there is some bad... X-Git-Tag: v5.0~31 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=83219191e0f7b0293b804f9f62abd729ef5f1653;p=pgbadger Remove calls of binmode to force html file output to be utf8 as there is some bad side effect. Thanks to akorotkov for the report. --- diff --git a/pgbadger b/pgbadger index 2550789..29bf718 100755 --- a/pgbadger +++ b/pgbadger @@ -385,7 +385,6 @@ if ($extension eq 'tsung') { if (not defined $fh) { die "FATAL: can't write to $outfile, $!\n"; } - binmode($fh, ':utf8'); print $fh "\n"; $fh->close(); @@ -839,7 +838,6 @@ if ($extension ne 'tsung') { if (not defined $fh) { die "FATAL: can't write to $outfile, $!\n"; } - binmode($fh, ':utf8'); if (($extension eq 'text') || ($extension eq 'txt')) { if ($error_only) { &dump_error_as_text(); @@ -863,7 +861,6 @@ if ($extension ne 'tsung') { if (not defined $fh) { die "FATAL: can't write to $outfile, $!\n"; } - binmode($fh, ':utf8'); print $fh "\n"; $fh->close(); } @@ -8113,7 +8110,6 @@ sub autodetect_format my $fmt = ''; die "FATAL: can't open file $file, $!\n" unless(open(TESTFILE, $file)); - binmode(TESTFILE); my $fltf = ; close($fltf); # is file in binary format ?