From: lpsolit%gmail.com <> Date: Thu, 15 Jan 2009 01:16:04 +0000 (+0000) Subject: Bug 464992: Binary attachments, graphical reports and new charts are not displayed... X-Git-Tag: bugzilla-3.2.1~17 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0a90c649c1ec4901192a042ca490d178d337257c;p=thirdparty%2Fbugzilla.git Bug 464992: Binary attachments, graphical reports and new charts are not displayed correctly on Windows - Patch by Frédéric Buclin r=mkanat a=LpSolit --- diff --git a/Bugzilla/Util.pm b/Bugzilla/Util.pm index 7e5063b8c6..4433939d9b 100644 --- a/Bugzilla/Util.pm +++ b/Bugzilla/Util.pm @@ -592,7 +592,7 @@ sub get_netaddr { sub disable_utf8 { if (Bugzilla->params->{'utf8'}) { - binmode STDOUT, ':raw'; # Turn off UTF8 encoding. + binmode STDOUT, ':bytes'; # Turn off UTF8 encoding. } } diff --git a/chart.cgi b/chart.cgi index 70eeb814a3..c74df4f7b3 100755 --- a/chart.cgi +++ b/chart.cgi @@ -282,6 +282,8 @@ sub plot { } print $cgi->header($format->{'ctype'}); + disable_utf8() if ($format->{'ctype'} =~ /^image\//); + $template->process($format->{'template'}, $vars) || ThrowTemplateError($template->error()); } diff --git a/report.cgi b/report.cgi index 2b9cb61ad0..913f85dde1 100755 --- a/report.cgi +++ b/report.cgi @@ -319,6 +319,8 @@ if ($cgi->param('debug')) { # All formats point to the same section of the documentation. $vars->{'doc_section'} = 'reporting.html#reports'; +disable_utf8() if ($format->{'ctype'} =~ /^image\//); + $template->process("$format->{'template'}", $vars) || ThrowTemplateError($template->error());