php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #39075 htmlentities() seems to mistranslate pound sign
Submitted: 2006-10-07 09:27 UTC Modified: 2006-10-07 09:42 UTC
From: fasaxc at f2s dot com Assigned:
Status: Not a bug Package: Unknown/Other Function
PHP Version: 5.1.6 OS: Not known
Private report: No CVE-ID: None
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: fasaxc at f2s dot com
New email:
PHP Version: OS:

 

 [2006-10-07 09:27 UTC] 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?

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2006-10-07 09:42 UTC] tony2001@php.net
var_dump("?");
=>
string(2) "?"

Notice the "2". This is Unicode character.

 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Mon Jul 14 14:01:31 2025 UTC