Tomas Kuliavas wrote:
>>I received a mail with a encoded subject, wich was not decoded:
>>Subject: =?windows-1252?Q?Nikon Information 06-04: Photokina 2004?=
>>I changed the file functions/mime.php and added support for
>>mb_decode_mimeheader if the function is available. if not, the old code is
>>used. mb_decode_mimeheader is available since php 4.0.6. This worked well,
>>but i noticed, that when i reply to a mail, the mail was not correctly
>>quoted. I then found some calls in src/compose.php where decodeHeader is
>>called with data witch does not come from the header. This makes no sense
>>for me, so i removed those calls and now everything works fine for me.
>>The patch with my changes for squirrelmail 1.4.3a is attached to this
> I suspect that you recieved email that violates rfc2045. That's why that
> header was not decoded. SquirrelMail 1.4.3a is able to read email headers
> written in windows-1252 charset.
But the function decodeHeader does not decode encoded strings when there
are blanks between =?windows-1252?Q? and ?=. I dont know, if blanks are
allowed or not, but Mozilla-Mail displays the Subject correctly.
> Check if that email contains MIME-Version header or show us rfc822 source
> of email.
This is the header of the mail:
Received: from services190.intern.esitebuilder.ch
(services190.esitebuilder.everyware.ch [184.108.40.206] (may be forged))
by goldnet.ch (8.12.9/8.12.9/Debian-3) with ESMTP id i8GEek7V030486
for <felix.egli@...>; Thu, 16 Sep 2004 16:40:46 +0200
Received: by services190.intern.esitebuilder.ch (Postfix, from userid 100)
id F35A26725A; Thu, 16 Sep 2004 16:12:01 +0200 (CEST)
To: "=?windows-1252?Q?egli felix?=" <felix.egli@...>
Content-Type: text/plain; charset=windows-1252
Subject: =?windows-1252?Q?Nikon Information 06-04: Photokina Wahnsinn 2004?=
Date: Thu, 16 Sep 2004 16:12:01 +0200 (CEST)