|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2004-09-08 04:43 UTC] xing at mac dot com
Description: ------------ htmlentities function appears to eat "?<" but correctly handle "? <". Reproduce code: --------------- $str = "Le Caf?< Caf? <"; $str = html_entity_decode((htmlentities($str,ENT_QUOTES,"UTF-8")); Expected result: ---------------- "Le Caf?< Caf? <" Actual result: -------------- "Le Caf< Caf? <" PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Nov 02 07:00:01 2025 UTC |
There should be no hidden UTF-8 characters in the string: all ascii compliant including the french accented e. I did however have an error in the code where extra "(" was added. Here is the complete and correct code you can just copy-paste from any browser. ------ <? $str = "Le Caf?< Caf? <"; $str = html_entity_decode(htmlentities($str,ENT_QUOTES,"UTF-8")); echo $str; ?>