aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2009-01-15 01:13:50 +0000
committerlpsolit%gmail.com <>2009-01-15 01:13:50 +0000
commitee5cbb72fe58f9fa8c5fad39da67fc078496db94 (patch)
tree00ffbd17af80a5271becf78a95bf0148f9f46394
parent8f824bbf135b789c37cae6d6b40df029293b7d78 (diff)
downloadbugs-ee5cbb72fe58f9fa8c5fad39da67fc078496db94.tar
bugs-ee5cbb72fe58f9fa8c5fad39da67fc078496db94.tar.gz
bugs-ee5cbb72fe58f9fa8c5fad39da67fc078496db94.tar.bz2
bugs-ee5cbb72fe58f9fa8c5fad39da67fc078496db94.tar.xz
bugs-ee5cbb72fe58f9fa8c5fad39da67fc078496db94.zip
Bug 464992: Binary attachments, graphical reports and new charts are not displayed correctly on Windows - Patch by Frédéric Buclin <LpSolit@gmail.com> r=mkanat a=LpSolit
-rw-r--r--Bugzilla/Util.pm2
-rwxr-xr-xchart.cgi2
-rwxr-xr-xreport.cgi2
3 files changed, 5 insertions, 1 deletions
diff --git a/Bugzilla/Util.pm b/Bugzilla/Util.pm
index 376bcf6cd..8666b18ff 100644
--- a/Bugzilla/Util.pm
+++ b/Bugzilla/Util.pm
@@ -623,7 +623,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 25d5b446d..ab145c42a 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 c84ed6208..fd2f28943 100755
--- a/report.cgi
+++ b/report.cgi
@@ -328,6 +328,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());