Bug #19346 [Com]: Wrong charset encoding
| From: | iclemartin | Date: | Mon, 10 Dec 2012 21:19:00 +0000 |
| Subject: | Bug #19346 [Com]: Wrong charset encoding | ||
| References: | 1 | Groups: | php.pear.bugs |
| Request: | Send a blank email to pear-bugs+get-9403@lists.php.net to get a copy of this message | ||
Edit report at http://pear.php.net/bugs/bug.php?id=19346&edit=1
ID: 19346
Comment by: iclemartin
Reported By: wayne at devzing dot com
Summary: Wrong charset encoding
Status: Feedback
Type: Bug
Package: Mail_mimeDecode
Package Version: 1.5.5
PHP Version: 5.3.10
New Comment:
change line 687 to:
$text = iconv($charset, "UTF-8//TRANSLIT", base64_decode($text));
Previous Comments:
------------------------------------------------------------------------
[2012-03-26 11:07:05] alan_k
<div id="changeset">
<span class="removed">-Status: Open</span>
<span class="added">+Status: Feedback</span>
</div>Seems 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);
------------------------------------------------------------------------
[2012-03-25 00:14:06] alexvolkow
Description:
------------
Koi8r charset subject line to utf-8 problem
Test script:
---------------
Subject: =?KOI8-R?B?8NLJ18XUIQ==?=
Expected result:
----------------
Subject: ??????!
Actual result:
--------------
Subject: ?÷??????????!
------------------------------------------------------------------------
--
Edit this bug report at http://pear.php.net/bugs/bug.php?id=19346&edit=1