I had the same problem (with Cyrillic letters), and only/most elegant
solution I found was to modify the core.

Try this: in file "cake/libs/model/dbo/dbo_mysql.php" find function
connect(). Replace these lines:

        if (mysql_select_db($config['database'], $this->connection))
        {
            $this->connected = true;
        }

with this:

        if (mysql_select_db($config['database'], $this->connection))
        {
            mysql_query("SET names utf8");
            $this->connected = true;
        }

I wish there was more elegant solution, without modifying the core.
Perhaps another setting in DATABASE_CONFIG (app/config/database.php),
something like:

    var $default = array('driver'    => 'mysql',
                         'connect'  => 'mysql_connect',
                         'host'     => 'localhost',
                         'login'    => 'user',
                         'password' => 'password',
                         'database' => 'project_name',
                         'charset' => 'utf8',
                         'prefix'    => '');

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cake-php
-~----------~----~----~----~------~----~------~--~---

Reply via email to