I am pulling information from a table in phpMYAdmin. It is created in Wordpress and is encoded in UTF-8 (I have checked the config file). When I echo the content it displayed some characters as � The characters include double spaces, apostrophes, line breaks and ™
I have used the function forceutf() from here https://github.com/neitanod/forceutf8 (including its updated fix). However this replaced all the � with ?
Is there another method I can use?
UPDATE
I have checked my database tables, the symbols appear correctly in the table.
This appears in the phpMyAdmin mainpage
Server: Localhost via UNIX socket
Server version: 5.5.36-log
Protocol version: 10
User: ********
MySQL charset: UTF-8 Unicode (utf8)
I have set
<meta charset="UTF-8">
in my php file.
I have also got a UTF-8 check in my script, which returns : Current character set: utf8
if (!$con->set_charset("utf8")) {
printf("Error loading character set utf8: %s\n", $con->error);
} else {
printf("Current character set: %s\n", $con->character_set_name());
}
The browser I am using is Chrome, but is intended for Mobile browsers.