#48645 [Asn->Csd]: mb_convert_encoding() doesn't understand hexadecimal html-entities
| From: | moriyoshi@php.net | Date: | Wed, 29 Jul 2009 04:44:23 +0000 |
| Subject: | #48645 [Asn->Csd]: mb_convert_encoding() doesn't understand hexadecimal html-entities | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-140412@lists.php.net to get a copy of this message | ||
ID: 48645
Updated by: moriyoshi@php.net
Reported By: psc at webcraft dot ch
-Status: Assigned
+Status: Closed
Bug Type: mbstring related
Operating System: Debian Lenny
PHP Version: 5.*
Assigned To: moriyoshi
New Comment:
This bug has been fixed in SVN.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2009-07-29 04:44:08] svn@php.net
Automatic comment from SVN on behalf of moriyoshi
Revision: http://svn.php.net/viewvc/?view=revision&revision=286483
Log: * Fix bug #48645 (mb_convert_encoding() doesn't understand
hexadecimal html-entities)
------------------------------------------------------------------------
[2009-07-29 03:00:17] moriyoshi@php.net
This isn't actually a bug, as it wasn't implemented at all. (I don't
know why the original implementer doesn't take account of it.)
------------------------------------------------------------------------
[2009-06-22 14:47:04] psc at webcraft dot ch
Description:
------------
When converting a hexadecimal html entity to UTF-8 with
mb_convert_encoding, it get's converted to a broken unicode character
(displayed in firefox as a small square).
Reproduce code:
---------------
$v_html = "š";
echo $v_html;
echo mb_convert_encoding($v_html, 'UTF-8', 'HTML-ENTITIES');
echo html_entity_decode($v_html, ENT_COMPAT, 'UTF-8');
Expected result:
----------------
I'd expect it to output three times the same character, š.
At first as hexadecimal html entity, then two times in UTF-8.
š
Actual result:
--------------
š[something broken]
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=48645&edit=1