[rt-devel] Re: [PATCH] Preserve original charset + fix bogus UTF32LE guess on binary attachments
Autrijus Tang
autrijus at autrijus.org
Sat Jun 28 05:22:11 EDT 2003
On Sat, Jun 28, 2003 at 11:09:47AM +0400, Dmitry Sivachenko wrote:
> On Sat, Jun 28, 2003 at 01:39:00AM +0800, Autrijus Tang wrote:
> > This is not something to worry about at all. "Detecting" including
> > using the explicit info. It's not "guessing".
>
> Well, I was talking about _GuessCharset subroutine, which only *guesses*
> charset via Encode::Guess. I see no reason to guess something in
> http://mitya.pp.ru/rt-bad , because all non-ascii characters it in are
> properly encoded.
> Probably I am missing something.
Yeah. RT still needs to Guess the charset for the main entity,
because it says:
Content-Type: multipart/mixed;
boundary="----=_NextPart_000_0FF2_01C33CAF.BB8C8E00"
and mentions nothing about its own Content-Type.Charset. Hence in
order to determine how to decode its headers, like Subject:
Subject: =?windows-1251?B?ze7i7vHy6CDu8iDI7fLl6y3S?=
RT has to feed the headers to _GuessCharset. Since it contains
only ascii characters, 'ascii' will be used and no transformation
will take place.
This is merely a safeguard against broken MUAs that sends out
headers that contain high-bit characters.
> > Can you try the following patch against RT::Action::SendEmail
> > and see if it works?
>
> Yes, not filename of the attachment is properly encoded, thanks!
I assume s/not/now/. Good then! :-)
Thanks,
/Autrijus/
-------------- 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/cef7a436/attachment.pgp
More information about the Rt-devel
mailing list