开发者

Getting UTF8 characters as ??? when results are fetched to application using Zend DB

I am trying to fetch utf8 characterset data from mysql database but i am getting ?????? instead of utf8 data. These are the configurations in my application. I am able to view the utfdata in my php myadmin. but when it comes to application it is displaying as ????

Application Header

< meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

Boot Strap setupDatabase:

$db->query("SET CHARACTER SET 'utf8'");
$db->query("SET character_set_results=utf8");
$db->query("SET NAMES 'utf8'");

Zend Applic开发者_如何转开发ation.ini

resources.db.params.charset = "utf8"
resources.db.params.driver_options.1002 = "SET NAMES UTF8;"

MySql Character Set

character_set_client    utf8

character_set_connection    utf8

character_set_database  utf8

character_set_filesystem    binary

character_set_results   utf8

character_set_server    latin1

character_set_system    utf8

character_sets_dir  c:\wamp\bin\mysql\mysql5.1.36\share\charsets\


Rob Allen has a nice tutorial UTF8, PHP and MySQL

http://akrabat.com/php/utf8-php-and-mysql/

May be it will help you. Don't forget to go through the comments also .

Hope your database and table also with the same utf-8.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜