#36489 [Ana->Fbk]: Mimeheaders not properly encoded/decoded
ID: 36489
Updated by: sniper@php.net
Reported By: saeven at saeven dot net
-Status: Analyzed
+Status: Feedback
Bug Type: mbstring related
Operating System: Linux
PHP Version: 5.1.2
Assigned To: hirokawa
Previous Comments:
------------------------------------------------------------------------
[2006-03-12 09:17:43] hirokawa@php.net
I executed your code using PHP 5.1.2/Fedora Core3,
and I get the expected result.
test_тест
My php.ini setting is,
mbstring.detect_order => auto
mbstring.encoding_translation => Off
mbstring.func_overload => 0
mbstring.http_input => auto
mbstring.http_output => pass
mbstring.internal_encoding => ISO-8859-1
mbstring.language => neutral
mbstring.script_encoding => no value
mbstring.strict_detection => Off
mbstring.substitute_character => no value
PLease show me your php.ini settings which is related to mbstring.
------------------------------------------------------------------------
[2006-02-22 21:05:40] saeven at saeven dot net
..you'll have to imagine that the htmlencoded entities are utf8
characters.
------------------------------------------------------------------------
[2006-02-22 21:03:43] saeven at saeven dot net
Your system htmlencoded the utf8 content. Let me try again:
Code:
-------
$encode = mb_encode_mimeheader( "test_тест",
"utf-8", 'Q' );
echo mb_decode_mimeheader( $encode );
Expected Result:
------------------
test_тест;
Actual Result:
----------------
test_????
------------------------------------------------------------------------
[2006-02-22 21:00:24] saeven at saeven dot net
Description:
------------
mbstring is improperly encoding/decoding mimeheaders.
Reproduce code:
---------------
$encode = mb_encode_mimeheader( "test_тест",
"utf-8", 'Q' );
echo mb_decode_mimeheader( $encode );
Expected result:
----------------
test_тест
Actual result:
--------------
test_????
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=36489&edit=1
Thread (6 messages)