Issues

ZF-4943: Zend_Db_Adapter_Oracle does not support connection charset

Issue Type: Improvement Created: 2008-11-14T00:30:30.000+0000 Last Updated: 2008-11-19T04:32:06.000+0000 Status: Resolved Fix version(s): Reporter: David Seibert (developherr) Assignee: Mickael Perraud (mikaelkael) Tags: - Zend_Db_Adapter_Oracle

Related issues: - ZF-1541

Attachments:

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:

<pre class="highlight">
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

Posted by Mickael Perraud (mikaelkael) on 2008-11-19T04:30:51.000+0000

See also ZF-1541

Posted by Mickael Perraud (mikaelkael) on 2008-11-19T04:32:06.000+0000

Duplicates

Have you found an issue?

See the Overview section for more details.

Copyright

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

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

Contacts