aboutsummaryrefslogtreecommitdiffstats
path: root/attachment.cgi
diff options
context:
space:
mode:
Diffstat (limited to 'attachment.cgi')
-rwxr-xr-xattachment.cgi3
1 files changed, 3 insertions, 0 deletions
diff --git a/attachment.cgi b/attachment.cgi
index 768653c31..6fd238c2f 100755
--- a/attachment.cgi
+++ b/attachment.cgi
@@ -246,6 +246,9 @@ sub view {
print $cgi->header(-type=>"$contenttype; name=\"$filename\"",
-content_disposition=> "inline; filename=\"$filename\"",
-content_length => $attachment->datasize);
+ if (Bugzilla->params->{'utf8'}) {
+ binmode STDOUT, ':raw'; # Turn off UTF8 encoding.
+ }
print $attachment->data;
}