#43740 [Opn]: htmlspecialchars Bug UTF-8
| From: | derick@php.net | Date: | Thu, 03 Jan 2008 19:36:44 +0000 |
| Subject: | #43740 [Opn]: htmlspecialchars Bug UTF-8 | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-121015@lists.php.net to get a copy of this message | ||
ID: 43740
Updated by: derick@php.net
Reported By: heurika at gmail dot com
Status: Open
Bug Type: *Unicode Issues
Operating System: openSuse 10.1
PHP Version: 5.2.5
New Comment:
Works fine for me:
derick@kossu:~$ php
<?php
$test = ' Das für $ <>';
echo trim(htmlspecialchars($test, ENT_QUOTES, "UTF-8"));
?>
Das für $ <>
derick@kossu:~$ php -v
PHP 5.2.5RC2-dev (cli) (built: Oct 31 2007 11:42:16) (DEBUG)
Previous Comments:
------------------------------------------------------------------------
[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 $ <>
Actual result:
--------------
(empty output)
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=43740&edit=1