|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2012-10-11 12:51 UTC] hartz at mobilecity dot de
Description:
------------
Hi,
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,
Stephan
Test script:
---------------
echo "TEST:".
htmlentities('ÄÖÜäöüß')."|".htmlspecialchars('ÄÖÜäöüß')."|".'ÄÖÜäöüß';
Expected result:
----------------
TEST: ÄÖÜäöüß|ÄÖÜäöüß|ÄÖÜäöüß
Actual result:
--------------
TEST: ||ÄÖÜäöüß
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Nov 01 03:00:01 2025 UTC |
You need to specify the encoding. If you are using latin1, do: htmlentities('ÄÖÜäöüß',NULL,'ISO-8859-1'); PHP 5.4 defaults to UTF-8 because most of the world has switched at this point.