Issues

ZF-6863: Zendamf not handling special character data

Description

There seems to be an issue passing special character values via Zendamf:

While querying a database that returns data including French-text characters (ie: Québec), the result returned from Zendamf is not handling the special characters (ie: instead of Québec, we receive Qu�c).

I've checked the output of the data via Php: the issue is not with the database result - the characters are returned correctly from the database to the Php result-set - I am able to print these characters correctly before they are sent through Zendamf, either by rendering them from Php to a Browser via echo or by writing them to a log file.

However, once I plug the SQL result into an object and pass it to Zendamf, the special characters get mangled. Using Charles Web Debugging Proxy, I can see that the result values are mangled before they are passed back to my AS3 application.

I've tested this both locally and on a production server, using the most current libraries. I'm uncertain if there is a setting that would clear-up this issue, please advise, thank you!

Comments

This is not an issue with Zendamf, but rather Zend_Db, and to resolve the issue I enforced the character set of the persistent db connection to UTF-8 by using the following statement in the Zend_Db::factory parameters:

'driver_options' => array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8')

This issue can be deleted, thank you!