|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #63261 htmlentities and htmlspecialchars have problemens with german umlauts
Submitted: 2012-10-11 12:51 UTC Modified: 2012-10-12 05:15 UTC
Avg. Score:4.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:1 (100.0%)
Same OS:1 (100.0%)
From: hartz at mobilecity dot de Assigned:
Status: Not a bug Package: Output Control
PHP Version: 5.4.7 OS: Linux SLES 10
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
Solve the problem:
16 + 41 = ?
Subscribe to this entry?

 [2012-10-11 12:51 UTC] hartz at mobilecity dot de
with the following line of code you can see the problem.
In PHP 5.4.7 the funtions htmlentities and htmlspecialchars didn't support no more german umlauts. They returns an empty string.

Best regards,

Test script:
echo "TEST:".

Expected result:
TEST: ÄÖÜäöüß|ÄÖÜäöüß|ÄÖÜäöüß

Actual result:
TEST: ||ÄÖÜäöüß


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2012-10-11 12:53 UTC] hartz at mobilecity dot de
In PHP 5.3.x the expected result will be returned. After an update on 5.4.7 it works no more
 [2012-10-11 13:10 UTC] hartz at mobilecity dot de
My shell encoding and my editor encodings are setted to latin1.
This is also no utf8-encoding-problem.
The error occurs after updating my server from 5.3.17 on 5.4.7. 
The php source codes still the same like before the update.
 [2012-10-12 05:13 UTC]
You need to specify the encoding. If you are using latin1, do:


PHP 5.4 defaults to UTF-8 because most of the world has switched at this point.
 [2012-10-12 05:15 UTC]
 [2012-10-12 05:15 UTC]
-Status: Open +Status: Not a bug
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Jun 15 20:01:29 2024 UTC