Package: request-tracker3.6
Version: 3.6.1-4
Severity: normal
Tags: upstream patch
Hi,
while investigating #416097 / #387104 (UTF8 problems with SpeedyCGI),
I noticed a small encoding problem with mod_perl too.
When viewing text/plain content behind the 'Download' link in the
ticket view, non-ascii characters are double-UTF8-encoded.
This comes from html/Ticket/Attachment/dhandler calling
$AttachmentObj->OriginalContent().
The bug is not present in 3.4.5. I believe the attached patch reverts this
regression from 3.4. I'll forward it upstream after some more testing.
(I suspect even attempting decode_utf8() on the next line is wrong
and will always fail, but this is the minimal fix.)
Cheers,
--
Niko Tyni [EMAIL PROTECTED]
--- lib/RT/Attachment_Overlay.pm 2007/03/28 08:49:06 1.1
+++ lib/RT/Attachment_Overlay.pm 2007/03/28 08:49:30
@@ -289,7 +289,7 @@
return( $self->loc("Unknown ContentEncoding [_1]", $self->ContentEncoding));
}
- Encode::_utf8_on($content);
+ # Encode::_utf8_on($content);
if (!$enc || $enc eq '' || $enc eq 'utf8' || $enc eq 'utf-8') {
# If we somehow fail to do the decode, at least push out the raw bits
eval {return( Encode::decode_utf8($content))} || return ($content);