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
View Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
If you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
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: Mon Dec 30 14:01:28 2024 UTC