开发者

PHP5 UTF-8 encoding error - PHP4 works fine

开发者 https://www.devze.com 2022-12-19 09:36 出处:网络
i\'m having some troubles with UTF-8 encoding on a website. Call开发者_高级运维ing my script using PHP5 all the umlauts (ä, ü, ö,...) look like this: ökflödsköl

i'm having some troubles with UTF-8 encoding on a website. Call开发者_高级运维ing my script using PHP5 all the umlauts (ä, ü, ö,...) look like this: ökflödsköl

Calling the script using PHP4 shows everything as expected...

both php.ini look the same an so my question would be:

is there an other file where i can change the output encoding?

Thanks


You need to tell htmlentities to use UTF-8

htmlentities($foo, null, 'UTF-8');

I hope that helps :)


New Status: if i remove htmlentities() it all looks great...

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号