Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>My bet is that your actual data might be stored with something other than utf8.</p> <p>First make sure that your database is properly set, meaning that everything is really stored with UTF-8 encoding.</p> <p>This is what I have done when facing similar problem:</p> <p>Always do testing in clean table, meaning that you should create new database and table for testing purposes and from the beginning make sure that all data actually stored in database is really utf8 encoded. </p> <p>Make sure that database encoding is utf8:</p> <pre><code>CREATE DATABASE `test` CHARACTER SET `utf8` COLLATE `utf8_general_ci`; </code></pre> <p>Make sure that fields containing text is encoded with utf8:</p> <pre><code>CREATE TABLE `test` \ (`id` INT AUTO_INCREMENT PRIMARY KEY, \ `name` VARCHAR(512) COLLATE `utf8_general_ci`) \ CHARACTER SET `utf8` COLLATE `utf8_general_ci`; </code></pre> <p>Make sure that connection used to retrieve data returns unmodified UTF-8 strings.</p> <pre><code>$connection = mysql_connect( ... ); // Make sure that connection does not change encoding: mysql_set_charset('utf8', $connection); // Insert some test data: mysql_query("INSERT INTO `test` (`name`) VALUES (`Ab✓cdÄö`)", $connection); </code></pre> <p>After that try to read it and check if it works like it should, if it works then you know that problem is that something in your existing database, table structure or connection is wrong and should be something similar that we just set up in our test environment.</p> <p>If you are using phpmyadmin just set everything as utf8 and select suitable utf8 collation that is same at every point. Then try to add some data to tables by using phpmyadmin and try read it with your php application. utf8_general_ci should work well.</p> <p>Some information here: <a href="http://dev.mysql.com/doc/refman/5.1/en/charset-connection.html" rel="nofollow">MySQL Connection Character Sets and Collations</a></p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload