#39891 [Opn->Csd]: htmlentities missing entity

From: Date: Thu, 21 Dec 2006 06:31:55 +0000
Subject: #39891 [Opn->Csd]: htmlentities missing entity
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-106713@lists.php.net to get a copy of this message
ID: 39891 User updated by: jeff at dakusan dot com Reported By: jeff at dakusan dot com -Status: Open +Status: Closed Bug Type: Feature/Change Request Operating System: Multiple (XP & RedHat) PHP Version: 5.2.0 New Comment: You are correct. It is only part of the cp1252 "Windows specific charset for Western European." for php. http://www.w3.org/TR/html4/sgml/entities.html states that it is part of the "Character entity references for symbols, mathematical symbols, and Greek letters" - [ISO10646]. Thanks. Previous Comments: ------------------------------------------------------------------------ [2006-12-20 18:35:00] shire@php.net 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('&rsquo;', ENT_COMPAT, 'UTF-8'); echo $char; echo htmlentities($char, ENT_COMPAT, 'UTF-8'); ?> ------------------------------------------------------------------------ [2006-12-19 17:39:15] jeff at dakusan dot com Description: ------------ htmlentities is missing the ’ character as &rsquo;. Reproduce code: --------------- print htmlentities("’"); Expected result: ---------------- &rsquo; Actual result: -------------- ’ ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=39891&edit=1

« previous php.bugs (#106713) next »