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

From: Date: Mon, 28 Jan 2008 23:46:16 +0000
Subject: #43740 [Opn->NoF]: htmlspecialchars Bug UTF-8
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-121650@lists.php.net to get a copy of this message
ID: 43740 Updated by: tony2001@php.net Reported By: heurika at gmail dot com -Status: Open +Status: No Feedback Bug Type: *Unicode Issues Operating System: openSuse 10.1 PHP Version: 5.2.5 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 (#121650) next »