From: poletto at gmail dot com Operating system: GNU/Linux 2.6 x86 PHP version: 5.2CVS-2009-02-04 (snap) PHP Bug Type: Strings related Bug description: html_entity_decode and CP1252
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 bug report at http://bugs.php.net/?id=47305&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=47305&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=47305&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=47305&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=47305&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=47305&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=47305&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=47305&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=47305&r=needscript Try newer version: http://bugs.php.net/fix.php?id=47305&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=47305&r=support Expected behavior: http://bugs.php.net/fix.php?id=47305&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=47305&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=47305&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=47305&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=47305&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=47305&r=dst IIS Stability: http://bugs.php.net/fix.php?id=47305&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=47305&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=47305&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=47305&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=47305&r=mysqlcfg