php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #43740 htmlspecialchars Bug UTF-8
Submitted: 2008-01-03 19:29 UTC Modified: 2008-03-26 12:35 UTC
Votes:4
Avg. Score:3.2 ± 1.3
Reproduced:4 of 4 (100.0%)
Same Version:4 (100.0%)
Same OS:1 (25.0%)
From: heurika at gmail dot com Assigned:
Status: Not a bug Package: *Unicode Issues
PHP Version: 5.2.5 OS: openSuse 10.1
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: heurika at gmail dot com
New email:
PHP Version: OS:

 

 [2008-01-03 19:29 UTC] 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)

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2008-01-03 19:36 UTC] 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-03-26 12:35 UTC] jani@php.net
See bug #43896

 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 17:01:58 2024 UTC