[rt-users] Attachments subject from message header twice encode to utf8
Alexey G Misyurenko
mag at caravan.ru
Wed Oct 11 07:37:24 EDT 2006
Hello!
Can't any body also have next one problems
Message Header Subject which is stored on database
in utf8 encoding is one more time encoded to utf8 before
it is shown ? (the same result in 3.4.4 and 3.6.1 )
Currently I find next workaround (against 3.6.1).
This is only workaround the 'bug' is taken more early.
Also by this bug is affected corresponded replies from
RT to e-mail users.
p.s. I don't know is Encode::_utf8_on using is needed....
*** local/html/Ticket/Elements/ShowMessageHeaders Wed Oct 11
15:32:37 2006
--- share/html/Ticket/Elements/ShowMessageHeaders Tue Jun 20
02:44:04 2006
*************** $content = $m->interp->apply_escapes($co
*** 65,80 ****
my @lines = split /\n/, $content;
my $in_header = 0;
my @headers;
- my $msgtag;
- my $msgval;
for (@lines) {
if (/^(\S+):\s+(.*)$/) {
! $msgtag = $1;
! $msgval = $2;
! Encode::_utf8_on($msgval);
! eval { $magtext = Encode::decode_utf8($msgval) };
! push @headers, { Tag => $magtag, Value => $magtext };
}
elsif (/^\s+/) {
$headers[-1]->{'Value'} .= $_;
--- 65,74 ----
my @lines = split /\n/, $content;
my $in_header = 0;
my @headers;
for (@lines) {
if (/^(\S+):\s+(.*)$/) {
! push @headers, { Tag => $1, Value => $2 };
}
elsif (/^\s+/) {
$headers[-1]->{'Value'} .= $_;
More information about the rt-users
mailing list