ZF-6863: Zendamf not handling special character data

Issue Type: Bug Created: 2009-05-29T16:46:48.000+0000 Last Updated: 2011-02-18T08:14:06.000+0000 Status: Resolved Fix version(s): Reporter: John Fraboni (sidedoor) Assignee: Ralph Schindler (ralph) Tags: - Zend_Amf

Related issues: Attachments:


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!


Posted by John Fraboni (sidedoor) on 2009-05-29T19:48:20.000+0000

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!

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.