Issues

ZF-4943: Zend_Db_Adapter_Oracle does not support connection charset

Description

oci_connect is capable of handling a connection charset parameter, whereas the current implementation of Zend_Db_Adapter_Oracle is not.

This can be easily implemented by altering protected _connect() of Zend_Db_Adapter_Oracle:


if (isset($this->_config['dbname'])) {
            if (isset($this->_config['charset'])) {
                $this->_connection = @oci_connect(
                    $this->_config['username'],
                    $this->_config['password'],
                    $this->_config['dbname'], 
                    $this->_config['charset']);
            } else {
                $this->_connection = @oci_connect(
                    $this->_config['username'],
                    $this->_config['password'],
                    $this->_config['dbname']);
            }
        } else {
        if (isset($this->_config['charset'])) {
                $this->_connection = @oci_connect(
                    $this->_config['username'],
                    $this->_config['password'],
                    null, 
                    $this->_config['charset']);
            } else {
                $this->_connection = @oci_connect(
                    $this->_config['username'],
                    $this->_config['password']);
            }
        }

Comments

See also ZF-1541

Duplicates