#43740 [NoF->Bgs]: htmlspecialchars Bug UTF-8

From: Date: Wed, 26 Mar 2008 12:35:29 +0000
Subject: #43740 [NoF->Bgs]: htmlspecialchars Bug UTF-8
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-123662@lists.php.net to get a copy of this message
ID: 43740 Updated by: jani@php.net Reported By: heurika at gmail dot com -Status: No Feedback +Status: Bogus Bug Type: *Unicode Issues Operating System: openSuse 10.1 PHP Version: 5.2.5 New Comment: See bug #43896 Previous Comments: ------------------------------------------------------------------------ [2008-01-03 19:36:43] derick@php.net Works fine for me: derick@kossu:~$ php <?php $test = ' Das für $ <>'; echo trim(htmlspecialchars($test, ENT_QUOTES, "UTF-8")); ?> Das für $ &lt;&gt; derick@kossu:~$ php -v PHP 5.2.5RC2-dev (cli) (built: Oct 31 2007 11:42:16) (DEBUG) ------------------------------------------------------------------------ [2008-01-03 19:29:25] heurika at gmail dot com Description: ------------ PHP 5.2.5 cannot convert german special-chars like äöü$ with UTF-8. It worked fine on PHP 5.2.4. Reproduce code: --------------- <?php $test = ' Das für $ <>'; echo trim(htmlspecialchars($test, ENT_QUOTES, "UTF-8")); ?> Expected result: ---------------- Das für $ &lt;&gt; Actual result: -------------- (empty output) ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=43740&edit=1

« previous php.bugs (#123662) next »