From: Don Armstrong Date: Tue, 12 Mar 2013 20:47:32 +0000 (-0700) Subject: switch STDOUT to raw first, then use encoding(UTF-8) X-Git-Tag: release/2.6.0~313^2~8 X-Git-Url: https://git.donarmstrong.com/?p=debbugs.git;a=commitdiff_plain;h=37fa4f5e9b7218b8a909f2c0502a12c6b7f5303e switch STDOUT to raw first, then use encoding(UTF-8) --- 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);