From 37fa4f5e9b7218b8a909f2c0502a12c6b7f5303e Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Tue, 12 Mar 2013 13:47:32 -0700 Subject: [PATCH] switch STDOUT to raw first, then use encoding(UTF-8) --- cgi/bugreport.cgi | 4 ++-- cgi/pkgreport.cgi | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/cgi/bugreport.cgi b/cgi/bugreport.cgi index 55617ae..70f4229 100755 --- a/cgi/bugreport.cgi +++ b/cgi/bugreport.cgi @@ -8,8 +8,6 @@ BEGIN{ delete @ENV{qw(IFS CDPATH ENV BASH_ENV)}; } -# STDOUT should be using the utf8 io layer -binmode(STDOUT,':utf8'); use POSIX qw(strftime); use MIME::Parser; @@ -38,6 +36,8 @@ use List::Util qw(max); use CGI::Simple; my $q = new CGI::Simple; +# STDOUT should be using the utf8 io layer +binmode(STDOUT,':raw:encoding(UTF-8)'); my %param = cgi_parameters(query => $q, single => [qw(bug msg att boring terse), diff --git a/cgi/pkgreport.cgi b/cgi/pkgreport.cgi index d29c3ab..eb7a61a 100755 --- a/cgi/pkgreport.cgi +++ b/cgi/pkgreport.cgi @@ -18,9 +18,7 @@ BEGIN{ delete @ENV{qw(IFS CDPATH ENV BASH_ENV)}; } -# STDOUT should be in utf8 mode -binmode(STDOUT,':utf8'); - +binmode(STDOUT,':encoding(UTF-8)'); use POSIX qw(strftime nice); use Debbugs::Config qw(:globals :text :config); -- 2.39.2