Edit report at http://pear.php.net/bugs/bug.php?id=15960&edit=1
ID: 15960
Updated by: [email protected]
Reported By: rhyde at hydenetworks dot com
Summary: PATCH: mimeDecode ignores character encoding/charset
Status: Open
Type: Bug
Package: Mail_mimeDecode
Operating System: FreeBSD
PHP Version: 5.2.8
Roadmap Versions:
New Comment:
Thanks for the patch Trey.
Two quick ones:
1. cvs diff -u next time
2. Can you provide a small executable test case to prove your patch
works.
Previous Comments:
------------------------------------------------------------------------
[2009-02-28 00:29:48] treyhyde
Description:
------------
_decodeHeader ignores the charset portion of base64 encoded
headers. Doing so will work for 8859, ANSI and other 7bit compatible
charsets but not for GB* encoded Chinese or other similar "exotic"
character sets.
Similarly, it ignores the charset portion of content-type in the mime
definition of bodies.
This patch should do the same thing as it did before if iconv is not
present and the correct thing if it is present. You'll want to make
sure your iconv.*_encoding php.ini properties are set correctly or set
them at run time with iconv_set_encoding
Test script:
---------------
Expected result:
----------------
Actual result:
--------------
------------------------------------------------------------------------