Hi there,
I am trying to store Emojis in my database via phalcon db connection. I set table to CHARSET 'utf8mb4_general_ci' and also column.
I also set database service to charset 'utf8mb4':
$di->set('db', function () use ($config) {
return new \Phalcon\Db\Adapter\Pdo\Mysql(array(
"host" => $config->database->host,
"username" => $config->database->username,
"password" => $config->database->password,
"dbname" => $config->database->dbname,
"charset" => "utf8mb4"
));
});
When I store a text with emojis directly with a query via phpmyadmin in it, all works fine. Emojis are stored right.
But when I store data via model ($object->save()
), the stored data looks like this:
"Prep Wiesngaudi ???????? about Saturday"
Instead of questionmarks there should be emojis.
What do I do wrong?
Thanks a lot!
Best