ID: 47146 Comment by: teiseler at gmx dot de Reported By: teiseller at gmx dot de Status: Feedback Bug Type: Strings related Operating System: Windows XP SP2 PHP Version: 5.2.8 New Comment:
Thanks, that worked. But in this case, there is still an error either with the documentation or the function. The Documentation sais: "Presently, the ISO-8859-1 character set is used as the default". But all I did was to specify this exact charset: $settings["sitetitle"] = htmlentities($_POST["SITETITLE"], ENT_COMPAT, "ISO8859-1"); this should be the default settings for the function (at leaste the documentation states so). Previous Comments: ------------------------------------------------------------------------ [2009-01-19 12:33:54] [email protected] What if you pass the correct charset in use to the function? (see http://php.net/htmlentities/ for more) ------------------------------------------------------------------------ [2009-01-19 11:03:50] teiseller at gmx dot de Description: ------------ the function htmlentities($string) does not convert german umlauts to the coresponding html entity. For example, an "ü" is convertet into "ü" instead of ü. Reproduce code: --------------- just perform the htmlentities function on any string containing a german umlaut, e.g. ä ü ö Expected result: ---------------- it should return the string with the following substitutes: ä ---> ä ü ---> ü ö ---> ö Ä ---> Ä Ü ---> Ü Ö ---> Ö Actual result: -------------- it returns cryptic chars for these characters, like "ü" (without the "") ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=47146&edit=1
