summaryrefslogtreecommitdiffstats
path: root/duplicates.cgi
diff options
context:
space:
mode:
authorlpsolit%gmail.com <>2007-05-10 18:35:02 +0200
committerlpsolit%gmail.com <>2007-05-10 18:35:02 +0200
commit61ec5e9081b152a7dea750f113aadf9c945ec2a8 (patch)
treede02e3f1ac24c234e3a3a36da0b229f7f7b74429 /duplicates.cgi
parent208399b506098df1136f2dec16e28861c6bb4b19 (diff)
downloadbugzilla-61ec5e9081b152a7dea750f113aadf9c945ec2a8.tar.gz
bugzilla-61ec5e9081b152a7dea750f113aadf9c945ec2a8.tar.xz
Bug 376911: Non-text content-types require setting the charset manually in the $cgi->header() call - Patch by guillomovitch@zarb.org r=gerv a=mkanat
Diffstat (limited to 'duplicates.cgi')
-rwxr-xr-xduplicates.cgi8
1 files changed, 7 insertions, 1 deletions
diff --git a/duplicates.cgi b/duplicates.cgi
index 94b35df97..e393d7c25 100755
--- a/duplicates.cgi
+++ b/duplicates.cgi
@@ -266,7 +266,13 @@ my $format = $template->get_format("reports/duplicates",
scalar($cgi->param('format')),
scalar($cgi->param('ctype')));
-print $cgi->header($format->{'ctype'});
+# We set the charset in Bugzilla::CGI, but CGI.pm ignores it unless the
+# Content-Type is a text type. In some cases, such as when we are
+# generating RDF, it isn't, so we specify the charset again here.
+print $cgi->header(
+ -type => $format->{'ctype'},
+ (Bugzilla->params->{'utf8'} ? ('charset', 'utf8') : () )
+);
# Generate and return the UI (HTML page) from the appropriate template.
$template->process($format->{'template'}, $vars)