[rt-devel] Re: [PATCH] Preserve original charset + fix bogus UTF32LE guess on binary attachments

Autrijus Tang autrijus at autrijus.org
Fri Jun 27 13:39:00 EDT 2003


On Fri, Jun 27, 2003 at 06:36:15PM +0400, Dmitry Sivachenko wrote:
> > [Fri Jun 27 12:51:17 2003] [debug]: Detecting charset for: Return-Path: <mitya at v
> > h.demos.su>
> > It looks like RT should not try to GUESS charset for elements which directly 
> > specify it (like in Subject above).

This is not something to worry about at all.  "Detecting" including
using the explicit info.  It's not "guessing".

> Content-Type: application/octet-stream;
<snip>
> Thus filename is in UTF without encoding specification.

Now _that_ is the problem because MUAs may not support raw UTF8
filenames.

Can you try the following patch against RT::Action::SendEmail
and see if it works?

Thanks,
/Autrijus/

==== //depot/RT/rt/lib/RT/Action/SendEmail.pm#41 - /home/autrijus/depot/RT/rt/lib/RT/Action/SendEmail.pm ====
@@ -164,7 +164,7 @@
             $MIMEObj->attach( Type => $attach->ContentType,
                               Charset => $attach->OriginalEncoding,
                               Data => $attach->OriginalContent,
-                              Filename => $attach->Filename,
+                              Filename => $self->MIMEEncodeString( $attach->Filename, $RT::EmailOutputEncoding ),
                               Encoding    => '-SUGGEST');
         }
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://pallas.eruditorum.org/pipermail/rt-devel/attachments/20030628/33a131ae/attachment.pgp


More information about the Rt-devel mailing list