ZF-423: Can't set connection character encoding with Zend_Db.

Issue Type: Improvement Created: 2006-10-04T16:21:03.000+0000 Last Updated: 2008-12-19T13:08:43.000+0000 Status: Closed Fix version(s): Reporter: Jordan Ryan Moore (jordanryanmoore) Assignee: Gavin (gavin) Tags: - Zend_Db

Related issues: - ZF-285



In order to retrieve UTF-8 data from a MySQL or Postgres database, it is sometimes necessary to execute the following SQL:

SET NAMES "utf8";

Otherwise, you can get question marks (?) in place of UTF-8 characters. As far as I know, neither MSSQL, DB2, or Oracle support this syntax. I would imagine that they have some method of setting the connection character encoding, unless the connection uses the encoding of the database.

I would suggest adding a "setEncoding()" method to the adapters that sets the connection's character encoding. This would be an empty method for the adapters that do not require setting the encoding. The encoding could also be an optional parameter sent to Zend_Db::factory().


Posted by Wil Sinclair (wil) on 2008-12-19T13:08:43.000+0000

Bookkeeping. Closing old issues and assigning them to the person who ultimately resolved the issue.

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.