]> granicus.if.org Git - pgbadger/commitdiff
Fix "Wide character in print" Perl message by setting binmode to :utf8. Thanks to...
authorDarold Gilles <gilles@darold.net>
Sat, 7 Dec 2013 08:52:43 +0000 (09:52 +0100)
committerDarold Gilles <gilles@darold.net>
Sat, 7 Dec 2013 08:52:43 +0000 (09:52 +0100)
pgbadger

index e0ba2b3bc6568584d3680c3e3a58ecf5c649cc31..852b23d3544cc0082b4ad6b36b0856a54ea2f9b8 100755 (executable)
--- 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 "<sessions>\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 "</sessions>\n";
        $fh->close();
 }