I had the exact same problem with Greek characters (using cake 1.1.*)
If the collation of your database is utf8_unicode_ci (I personally
use utf8_general_ci but I don't think it makes any difference, but u
should check that too) and the html pages are set to Utf-8 also, the
problem may be due the character set the client really uses to send
SQL statements to the server. That must be set also to Utf-8.
Check if executing this query ( $this->execute("SET NAMES 'UTF8'");)
before an insert solves your problem. You may also find something
useful here:
http://www.mail-archive.com/[email protected]/msg28262.html or
here: http://bakery.cakephp.org/articles/view/utf8-multibyte-behavior
Hope this helps.
Astariza
On Feb 4, 8:18 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:
> I have very weird problem.
> Hopefully I am doing something wrong here...
>
> If I input Korean characters into MySQL table (through CakePHP
> interface I threw together), i can read it back out, and everything is
> fine.
> But when I view the table data through phpMyAdmin, all Korean
> characters are garbled up.
>
> If I input Korean characters through phpMyAdmin SQL editor, Korean
> characters show up fine in the phpMyAdmin browser.
> But when I view the table data through CakePHP i threw together, all
> Korean characters are garbled up.
>
> You can see what I mean here:http://cake.ziroziro.com/books/knownbooks
>
> Collation on MySQL is utf8_unicode_ci
>
> The database setting I have set for database.php is,
>
> class DATABASE_CONFIG {
> var $default = array(
> 'driver' => 'mysql',
> 'persistent' => false,
> 'host' => 'localhost',
> 'port' => '',
> 'login' => 'cake_user',
> 'password' => '*********',
> 'database' => 'cake',
> 'schema' => '',
> 'prefix' => '',
> 'encoding' => 'UTF-8'
> );
>
> }
>
> Tnk you in advance for any insight!
--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---