#39075 [Opn->Bgs]: htmlentities() seems to mistranslate pound sign

From: Date: Sat, 07 Oct 2006 09:42:39 +0000
Subject: #39075 [Opn->Bgs]: htmlentities() seems to mistranslate pound sign
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-103234@lists.php.net to get a copy of this message
 ID:               39075
 Updated by:       tony2001@php.net
 Reported By:      fasaxc at f2s dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         Unknown/Other Function
 Operating System: Not known
 PHP Version:      5.1.6
 New Comment:

var_dump("£");
=>
string(2) "£"

Notice the "2". This is Unicode character.



Previous Comments:
------------------------------------------------------------------------

[2006-10-07 09:27:23] fasaxc at f2s dot com

Description:
------------
Calling htmlentities on '£' generates two entities rather than just
£ as expected.

Reproduce code:
---------------
<?php echo "£=>".htmlentities('£'); ?>

Expected result:
----------------
Output should be "£=>&pound;"

Actual result:
--------------
"£=>&Acirc;&pound;", where did the '&Acirc;' come from?


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=39075&edit=1


Thread (2 messages)

« previous php.bugs (#103234) next »