From 0a90c649c1ec4901192a042ca490d178d337257c Mon Sep 17 00:00:00 2001 From: "lpsolit%gmail.com" <> Date: Thu, 15 Jan 2009 01:16:04 +0000 Subject: [PATCH] =?utf8?q?Bug=20464992:=20Binary=20attachments,=20graphica?= =?utf8?q?l=20reports=20and=20new=20charts=20are=20not=20displayed=20corre?= =?utf8?q?ctly=20on=20Windows=20-=20Patch=20by=20Fr=C3=83=C2=A9d=C3=83?= =?utf8?q?=C2=A9ric=20Buclin=20=20r=3Dmkanat=20a=3DLpSo?= =?utf8?q?lit?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- Bugzilla/Util.pm | 2 +- chart.cgi | 2 ++ report.cgi | 2 ++ 3 files changed, 5 insertions(+), 1 deletion(-) 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()); -- 2.47.2