PHP Encoding UTF Nightmare

Hi all. I hope someone can help. Encoding is a real pain in my a$$.

I’ve just redesigned my site and the character coding is all messed up on SOME pages. I have set everything I possible can to tell it to use UTF-8. In the meta tags in in ini file in the .htaccess and on the connection :smile:
mysqli_query($connection, "SET NAMES ’
mysqli_set_charset($connection, “utf8”);

strange thing is on some pages it displays fine e.g

The sentence : ‘Don’t stress it isn’t about’ is fine

This page however doesn’t.

The sentence : ‘I�m a bearded guy’. It should be I’m not I�m

It’s driving me mad. They are both stored in the database table the same, table and data encoding are set to UTF-8. Maybe it’s just my browser I don’t know. I know on the previous version of the site before the change it would display fine. I was using mysql_connect previously and using mysql_query(‘SET NAMES “utf8”’);

Any help appreciated.

Thanks in advance.

Okay. Fixed it. (So Far)

self::$connection->set_charset(“utf8”);

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.