|  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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: hartz at mobilecity dot de
New email:
PHP Version: OS:


 [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 22 04:01:29 2024 UTC