Req #18876 [Csd]: getting attachment filename in the desired charset
| From: | alan at akbkhome dot com | Date: | Mon, 26 Mar 2012 10:06:11 +0000 |
| Subject: | Req #18876 [Csd]: getting attachment filename in the desired charset | ||
| References: | 1 | Groups: | php.pear.bugs |
| Request: | Send a blank email to pear-bugs+get-8447@lists.php.net to get a copy of this message | ||
Edit report at https://pear.php.net/bugs/bug.php?id=18876&edit=1
ID: 18876
Updated by: alan@akbkhome.com
Reported By: pear at dlopez dot com
Summary: getting attachment filename in the desired charset
Status: Closed
Type: Feature/Change Request
Package: Mail_mimeDecode
Operating System: linux
Package Version: SVN
PHP Version: 5.3.8
Assigned To: alan_k
Roadmap Versions:
New Comment:
This seems to work fine.
$mime_message =
"Subject: =?KOI8-R?B?8NLJ18XUIQ==?=
From: =?KOI8-R?B?4czFy9PBzsTSIPfPzMvP1w==?= <email@gmail.com>
Hello
";
require_once 'Mail/mimeDecode.php';
$decoder = new Mail_mimeDecode($mime_message);
$params = array(
'include_bodies' => TRUE,
'decode_bodies' => TRUE,
'decode_headers' => 'UTF8//IGNORE'
);
$decoded = $decoder->decode($params);
print_r($decoded);
Previous Comments:
------------------------------------------------------------------------
[2012-03-24 22:24:52] alexvolkow
It seems to be that this site does'nt support russian charset,
so I've posted my question to pastebin.com
http://pastebin.com/dffYuLBU
------------------------------------------------------------------------
[2012-03-24 22:20:42] alexvolkow
Hi,
I've a problem with new patch,
As an example:
Subject: =?KOI8-R?B?8NLJ18XUIQ==?=
From: =?KOI8-R?B?4czFy9PBzsTSIPfPzMvP1w==?= <email@gmail.com>
Becomes:
Subject: ?÷??????????!
From: ????????? ?????? <email@gmail.com>
It should be as follows,
Subject: ??????!
So the subject line being modified to KOI8-R , but not to UTF-8.
Thanks in advance!
------------------------------------------------------------------------
[2011-10-04 01:39:00] alan_k
Thanks, I think my eyes are going ;)
------------------------------------------------------------------------
[2011-10-03 18:27:16] dlopez
Sorry to continue the thread... was there a reason you check the return
value of the iconv call after the loop, but not the one inside the loop?
I would think it should be in there as well...
------------------------------------------------------------------------
[2011-10-03 07:48:24] alan_k
Thanks, well spotted, should be fixed in svn now.
Regards
Alan
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
http://pear.php.net/bugs/bug.php?id=18876
--
Edit this bug report at https://pear.php.net/bugs/bug.php?id=18876&edit=1