#43294 [Opn->Fbk]: htmlentities with UTF8 fails if dagger character supplied

From: Date: Mon, 10 Dec 2007 10:01:50 +0000
Subject: #43294 [Opn->Fbk]: htmlentities with UTF8 fails if dagger character supplied
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-120519@lists.php.net to get a copy of this message
ID: 43294 Updated by: jani@php.net Reported By: tallyce at gmail dot com -Status: Open +Status: Feedback Bug Type: Strings related Operating System: Windows or Linux PHP Version: 5.2.5 New Comment: Seems to work fine for me: [jani@localhost ~]$ php t.php Test &dagger;<br />Test[ Please try on command line. Previous Comments: ------------------------------------------------------------------------ [2007-11-14 14:39:48] tallyce at gmail dot com Description: ------------ A string which includes the † dagger symbol that is processed with htmlentities() with UTF-8 as the encoding results in the whole string being discarded and appearing as blank. This is definitely a change in PHP 5.2.5. Tested on both Windows and Linux machines. Reproduce code: --------------- <?php echo htmlentities ('Test †', ENT_COMPAT, 'UTF-8') . '<br />' . htmlentities ('Test', ENT_COMPAT, 'UTF-8'); ?> Expected result: ---------------- Test † Test [This is indeed the result as expected, on PHP v.5.2.4] Actual result: -------------- Test [Blank line at start] ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=43294&edit=1

« previous php.bugs (#120519) next »