php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #42023 html_entity_decode() skips some chars
Submitted: 2007-07-18 06:27 UTC Modified: 2010-10-11 07:06 UTC
Votes:5
Avg. Score:4.0 ± 0.9
Reproduced:5 of 5 (100.0%)
Same Version:2 (40.0%)
Same OS:3 (60.0%)
From: anders dot jenbo at pc dot dk Assigned:
Status: Not a bug Package: *General Issues
PHP Version: 5.2.3, 4.4.7 OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: anders dot jenbo at pc dot dk
New email:
PHP Version: OS:

 

 [2007-07-18 06:27 UTC] anders dot jenbo at pc dot dk
Description:
------------
html_entity_decode does not handle ” “ „ ∞ ’ • ™ … –

Reproduce code:
---------------
echo(html_entity_decode('  ”“„∞’•™…–'));

Expected result:
----------------
???∞?????

Actual result:
--------------
”“„∞’•™…–

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-07-21 14:05 UTC] mattias at secweb dot se
ISO-8859-1 which php5 will use by default dosen't support those characters. See http://www.w3.org/TR/REC-html40/sgml/entities.html#h-24.2

echo(html_entity_decode('”“„∞’•™…–', 0, 'UTF-8'));

.. will decode the entities.
 [2010-10-11 07:06 UTC] cataphract@php.net
-Status: Open +Status: Bogus -Package: Feature/Change Request +Package: *General Issues
 [2010-10-11 07:06 UTC] cataphract@php.net
See bug #52712.
 [2011-01-02 21:25 UTC] joerg dot lottermoser at web dot de
also affected: € (won't be decoded - PHP 5.3.1).
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Jul 15 02:01:33 2025 UTC