From f80f89b38a88a0d8fe5558e3b9ce34c8f1f42e2d Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Wed, 11 Apr 2012 11:59:26 -0700 Subject: [PATCH] use utf8 io layer for stdout in cgis --- cgi/bugreport.cgi | 3 +++ cgi/pkgreport.cgi | 3 +++ 2 files changed, 6 insertions(+) diff --git a/cgi/bugreport.cgi b/cgi/bugreport.cgi index 8ad688f..0a66311 100755 --- a/cgi/bugreport.cgi +++ b/cgi/bugreport.cgi @@ -8,6 +8,9 @@ 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; use MIME::Decoder; diff --git a/cgi/pkgreport.cgi b/cgi/pkgreport.cgi index 4f4ea80..d29c3ab 100755 --- a/cgi/pkgreport.cgi +++ b/cgi/pkgreport.cgi @@ -18,6 +18,9 @@ BEGIN{ delete @ENV{qw(IFS CDPATH ENV BASH_ENV)}; } +# STDOUT should be in utf8 mode +binmode(STDOUT,':utf8'); + use POSIX qw(strftime nice); use Debbugs::Config qw(:globals :text :config); -- 2.39.2