On 05/25/2014 05:38 PM, Joseph wrote:
> My php database, address book is set to (according to phpmyadmin): 
> Collation: utf8_general_ci
> 

The collation determines e.g. how strings are sorted, but that doesn't
mean the database supports utf-8 (although MySQL should by default these
days).

Try adding,

  [client]
  default-character-set = utf8

  [mysqld]
  character-set-server = utf8

to your /etc/mysql/my.cnf.

Then, in mysql, run,

  show create database $your_database;

This will show you the default character set, like,

   /*!40100 DEFAULT CHARACTER SET utf8 */

If it says utf8 and you've got those lines in my.cnf, you're in good
shape, and your console test (at least) should work. Getting PHP to play
along is another adventure, but take it one step at a time.


Reply via email to