#43294 [Fbk]: htmlentities with UTF8 fails if dagger character supplied
| From: | jani@php.net | Date: | Mon, 10 Dec 2007 10:02:15 +0000 |
| Subject: | #43294 [Fbk]: htmlentities with UTF8 fails if dagger character supplied | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-120520@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: Feedback
Bug Type: Strings related
Operating System: Windows or Linux
PHP Version: 5.2.5
New Comment:
Correct output:
$ php t.php
Test †<br />Test
Previous Comments:
------------------------------------------------------------------------
[2007-12-10 10:01:49] jani@php.net
Seems to work fine for me:
[jani@localhost ~]$ php t.php
Test †<br />Test[
Please try on command line.
------------------------------------------------------------------------
[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