Insert special characters to database in Zend
I Try to add following form array to data base in the Zend freamwork Db_abstract function ($db->insert($data))
$data = array(
[name] => Dinuka
[special_request] => I'm Dinuka Ö é Ñ Thilanga
)
But special_request values did not insert correctly. It insert only 'I'm Dinuka'. Other values are drop when insert the query.
I set following prams in my application.ini
resources.db.adapter = PDO_MYSQL
resources.db.params.host = 192.168.0.xxx
开发者_JAVA百科resources.db.params.username = xxxxx
resources.db.params.password = xxxxx
resources.db.params.dbname = xxxxx
resources.db.params.charset = utf8
Please help me. How I insert special values into the database as correct way.
Are you try to insert this utf-8 query from Command Line?
Maybe The problem is with postgres DB and not related to Zend adapter...
set the field's Collation as utf8_general_ci and try inserting again.
精彩评论