ID: 47305 Updated by: j...@php.net Reported By: poletto at gmail dot com -Status: Open +Status: Feedback Bug Type: Strings related Operating System: GNU/Linux 2.6 x86 PHP Version: 5.2CVS-2009-02-04 (snap) New Comment:
Please try using this CVS snapshot: http://snaps.php.net/php5.2-latest.tar.gz For Windows: http://windows.php.net/snapshots/ Previous Comments: ------------------------------------------------------------------------ [2009-02-04 13:44:54] poletto at gmail dot com Description: ------------ html_entity_decode doesn't decode spécific CP1252 entities (characters in the 0x80-0x9F range) when specifying 'cp1252' charset, whereas it decodes succesfully other latin1 characters. Reproduce code: --------------- <?php var_dump(html_entity_decode('€', ENT_QUOTES, 'cp1252')); var_dump(html_entity_decode('€', ENT_QUOTES, 'cp1252')); var_dump(html_entity_decode('é', ENT_QUOTES, 'cp1252')); var_dump(html_entity_decode('é', ENT_QUOTES, 'cp1252')); var_dump(html_entity_decode('é', ENT_QUOTES, 'cp1252')); ?> Expected result: ---------------- string(1) "" string(1) "" string(1) "é" string(1) "é" string(1) "é" Actual result: -------------- string(8) "€" string(7) "€" string(1) "é" string(1) "é" string(1) "é" ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=47305&edit=1