#49590 [Opn->Bgs]: htmlentities doesn't convert euro symbols

From: Date: Fri, 18 Sep 2009 17:50:17 +0000
Subject: #49590 [Opn->Bgs]: htmlentities doesn't convert euro symbols
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-142538@lists.php.net to get a copy of this message
ID: 49590 Updated by: jani@php.net Reported By: fernando at consultorpc dot com -Status: Open +Status: Bogus Bug Type: Strings related Operating System: Linux/Mac OSX Leopard PHP Version: 5.3.0 New Comment: That's incorrect as well since you're on UTF-8, this works: # php -r 'var_dump(htmlentities("€", ENT_COMPAT, "UTF-8"));' Previous Comments: ------------------------------------------------------------------------ [2009-09-18 14:19:12] fernando at consultorpc dot com Description: ------------ Htmlentities() doens't convert euro symbol correctly even when i set charset to ISO-8859-15. Reproduce code: --------------- <?php $html = htmlentities( 'Euro €' , ENT_COMPAT , 'ISO-8859-15' ); var_dump( $html ); Expected result: ---------------- "Euro &euro;" Actual result: -------------- "Euro &acirc;?&not;" ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=49590&edit=1

« previous php.bugs (#142538) next »