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

Dmitry Sivachenko mitya at cavia.pp.ru
Fri Jun 27 07:49:25 EDT 2003


On Fri, Jun 27, 2003 at 03:24:24PM +0400, Dmitry Sivachenko wrote:
> On Fri, Jun 27, 2003 at 07:05:13PM +0800, Autrijus Tang wrote:
> > On Fri, Jun 27, 2003 at 01:29:33PM +0400, Dmitry Sivachenko wrote:
> > > Now RT sends text/html body as an attach, but it does not specify the
> > > encoding of that attach:
> > > 
> > > ------------=_1056705889-6534-1
> > > Content-Type: text/html
> > > Content-Disposition: inline
> > > Content-Transfer-Encoding: quoted-printable
> > > 
> > > The body of the original message was text/html; charset=windows-1251,
> > > but the information about charset is missing in the message RT sends to
> > > subscribers.
> > 
> > Indeed, that's a flaw of my OriginalEncoding implementation.
> > 
> > The patch below against lib/RT/I18N.pm should cure it, as well as
> > fix the bofus UTF32 guessing bug for binary attachments -- it now
> > only feeds text/*'s body to Encode::Guess, which is IMHO the
> > Right Thing to do.
> > 
> > Testing and feedback will be appreciated.
> > 

I found a problem with that patch.  Now all valid subjects
(say, =?koi8-r?B?1MXT1A==?=) are incorrectly processed.
This one becomes =?KOI8-R?B?W3ZoLmRlbW9zLnN1ICMyNzYwXSA/Pz8/Pz8/Pw==?=
and MUA displays it as [vh.demos.su #2760] ????????
(note '????????' at the end).




More information about the Rt-devel mailing list