[rt-devel] Decoding of Subjects broken in 3.0.3pre3 (3.0.3pre2 was OK)
Dmitry Sivachenko
mitya at cavia.pp.ru
Sat Jun 14 15:55:46 EDT 2003
On Sat, Jun 14, 2003 at 11:42:13PM +0400, Dmitry Sivachenko wrote:
> On Sun, Jun 15, 2003 at 03:17:06AM +0800, Autrijus Tang wrote:
> > On Sat, Jun 14, 2003 at 03:21:45PM +0400, Dmitry Sivachenko wrote:
> > > What do you think about my suggestion to pass every header containing
> > > non-ascii characters to Encode::Guess, as you do with message body?
> >
> > I think it's the only sane way out. Jesse?
> >
>
> Another sane way (which is more complex to implement) would be
> to look if message body contains text part and assume that encoding of
> headers is the same as encoding of the body.
> Otherwise, fallback to Encode::Guess.
> This is probably better solution because Encode::Guess may fail to
> determine encoding because headers typically contain a few characters
> to base a decision on, and headers should have the same encoding as
> text part of the body almost for sure.
>
> Just another thought.
PS: this will improve probability of the correct charset detection in the
following (rather common) situation:
A (broken) MUA sends a plain text message with non-ascii characters in
both body and subject (and probably other header fields like From).
The best way in such a case would be to run body through Encode::Guess
and then treat other header fields as if they are in the same encoding.
-------------- 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/20030614/bcccfc1c/attachment.pgp
More information about the Rt-devel
mailing list