From: Darold Gilles Date: Sat, 7 Dec 2013 08:52:43 +0000 (+0100) Subject: Fix "Wide character in print" Perl message by setting binmode to :utf8. Thanks to... X-Git-Tag: v5.0~33 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=692ff2994f13ac0e512a9afe79fd7ef38dc24c53;p=pgbadger Fix "Wide character in print" Perl message by setting binmode to :utf8. Thanks to Casey Allen Shobe for the report. --- diff --git a/pgbadger b/pgbadger index e0ba2b3..852b23d 100755 --- a/pgbadger +++ b/pgbadger @@ -386,6 +386,7 @@ 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,6 +840,7 @@ 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(); @@ -862,6 +864,7 @@ if ($extension ne 'tsung') { if (not defined $fh) { die "FATAL: can't write to $outfile, $!\n"; } + binmode($fh, ':utf8'); print $fh "\n"; $fh->close(); }