|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2010-10-08 11:01 UTC] cataphract@php.net
-Summary: html_entity_decode not working as expected with
cp1252 encoding at least
+Summary: html_entity_decode not working with CP-1251 (5.2
only) and ISO-8859-1
-Status: Open
+Status: Verified
[2010-10-08 11:01 UTC] cataphract@php.net
[2010-10-08 11:27 UTC] thyamat at msn dot com
[2010-10-08 17:09 UTC] cataphract@php.net
-Assigned To:
+Assigned To: cataphract
[2010-10-08 18:20 UTC] cataphract@php.net
[2010-10-08 18:31 UTC] cataphract@php.net
-Status: Verified
+Status: Closed
[2010-10-08 18:31 UTC] cataphract@php.net
[2010-10-08 19:27 UTC] cataphract@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 23 00:00:02 2025 UTC |
Description: ------------ Hi, There seems to be many bugs with html_entity_decode. Using cp1252 encoding, it decodes HTML numeric entities as if encoding was cp1251 (please note that it works correctly on 5.3.3). Using iso-8859-1 encoding does not seem to decode any numeric entity at all (same situation in 5.3.3). Please also note that &é is never decoded neither on 5.2.14 nor on 5.3.3. Test script: --------------- html_entity_decode('é&é é é&é é& &é', ENT_NOQUOTES, 'cp1252'); html_entity_decode('é&é é é&é é& &é', ENT_NOQUOTES, 'cp1251'); html_entity_decode('é&é é é&é é& &é', ENT_NOQUOTES, 'iso-8859-1'); Expected result: ---------------- expected results : é&é é é&é é& &é é&é é é&é é& &é é&é é é&é é& &é Actual result: -------------- results in 5.2.14 : й&é й й&й й& &é é&é é é&é é& &é é&é é é&é é& &é results in 5.3.3 : é&é é é&é é& &é é&é é é&é é& &é é&é é é&é é& &é