X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=cgi%2Fbugreport.cgi;h=de4ec76371633cfe8d9760a14a7f6e2142df6250;hb=ad30a96a3281439d4284f8ca54942d26c945279e;hp=8ad688f6923b501ea836557574b2a63f881c738a;hpb=03cad65103808bca0f63bc182e1b7827014471fe;p=debbugs.git diff --git a/cgi/bugreport.cgi b/cgi/bugreport.cgi index 8ad688f..de4ec76 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; @@ -168,6 +171,7 @@ if (defined($msg) and ($msg-1) <= $#records) { } my @log; if ( $mbox ) { + binmode(STDOUT,":raw"); my $date = strftime "%a %b %d %T %Y", localtime; if (@records > 1) { print $q->header(-type => "text/plain", @@ -242,6 +246,7 @@ END else { if (defined $att and defined $msg and @records) { + binmode(STDOUT,":raw"); $msg_num++; print handle_email_message($records[0]->{text}, ref => $ref,