[rt-users] RE: Problems with text/html Mails and Unicode
Torben Nehmer
torben.nehmer at cancom.de
Mon Nov 20 03:54:38 EST 2006
Hello everybody,
--- I wrote:
> I have a severe Problem with text/html mails sent to a RT queue via the
> Maligate, both on Web and on E-Mail Replies, the UTF-8 entities get
> double-encoded.
I have a few more bits of information.
The broken entries all are using Quotes-Printable encoding Method in the database:
While further digging into this I found the Method _DecodeLOB in Record.pm. When changing it to this, everything suddenly worked fine:
---snip---
sub _DecodeLOB {
my $self = shift;
my $ContentType = shift;
my $ContentEncoding = shift;
my $Content = shift;
if ( $ContentEncoding eq 'base64' ) {
$Content = MIME::Base64::decode_base64($Content);
}
elsif ( $ContentEncoding eq 'quoted-printable' ) {
$Content = MIME::QuotedPrint::decode($Content);
}
elsif ( $ContentEncoding && $ContentEncoding ne 'none' ) {
return ( $self->loc( "Unknown ContentEncoding [_1]", $ContentEncoding ) );
}
if ( $ContentType eq 'text/plain' || $ContentType eq 'text/html' ) {
$Content = Encode::decode_utf8($Content) unless Encode::is_utf8($Content);
}
return ($Content);
}
---snap---
The only change was activating UTF8 decoding also text/html.
Yours sincerely,
Torben Nehmer
-------
Torben Nehmer
Diplom Informatiker (FH)
Business System Developer
CANCOM Deutschland GmbH
Messerschmittstr. 20
89343 Scheppach
Germany
Phone: +49 (0)8225 - 996-1118
Fax: +49 (0)8225 - 996-41118
torben.nehmer at cancom.de
More information about the rt-users
mailing list