Setting the Character Set to UTF8 in Zend_DB for Oracle.
October 6, 2009 by Reboot · Leave a Comment
—– code snippet —–
$options = array(
‘host’ => ‘host.org’ ,
‘username’ => ‘uname’ ,
‘password’ => ‘upass’ ,
‘dbname’ => ‘name/SID’ , // (servicename requires NLS lookup entry!)
‘charset’ => ‘AL32UTF8′
);
$db = Zend_Db::factory(‘Oracle’, $options);
see also:
Thread: ORACLE UTF Chacter with PHP
http://forums.oracle.com/forums/thread.jspa?messageID=1930036
and
—– code snippet from ZendServer\share\ZendFramework\library\Zend\Db\Oracle.php —–
…
$connectionFuncName = ($this->_config['persistent'] == true) ? ‘oci_pconnect’ : ‘oci_connect’;
$this->_connection = @$connectionFuncName(
$this->_config['username'],
$this->_config['password'],
$this->_config['dbname'],
$this->_config['charset']);
// check the connection
…