|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2006-12-19 17:39 UTC] jeff at dakusan dot com
Description:
------------
htmlentities is missing the ? character as ’.
Reproduce code:
---------------
print htmlentities("?");
Expected result:
----------------
’
Actual result:
--------------
?
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Dec 02 02:00:01 2025 UTC |
Hello, if you specify the encoding type UTF-8 this should work as expected, I don't believe right single quote is part of the default iso-8859-1 specification. <?php $char = html_entity_decode('’', ENT_COMPAT, 'UTF-8'); echo $char; echo htmlentities($char, ENT_COMPAT, 'UTF-8'); ?>