0

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.

donlonc
  • 17
  • 5
  • you'll have to check all places where character-encoding matters. So: is the data properly encoded? is it properly encoded inside the DB? Is the DB returning the data in the proper encoding? Is your browser set to receive data in this encoding? (especially that last part is often the problem). – Tularis Mar 21 '14 at 17:44
  • See this post, perhaps is : http://stackoverflow.com/questions/15841854/strange-characters-appearing-in-wordpress – sgarcia Mar 21 '14 at 18:48
  • I have checked the database, it is properly encoded in the database, displaying the correct characters in the table. And is displayed correctly in the main page. I am creating a mobile site that takes the info from the database. And chrome should accept UTF-8 – donlonc Mar 21 '14 at 19:55

0 Answers0