From: River Tarnell Date: Sun, 11 Mar 2007 19:19:49 +0000 (+0000) Subject: set $NLS_LANG before connecting so Oracle knows we're using UTF-8 X-Git-Tag: 1.31.0-rc.0~53803 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=67a96dcaf091d9a316316484859461886df28504;p=lhc%2Fweb%2Fwiklou.git set $NLS_LANG before connecting so Oracle knows we're using UTF-8 --- diff --git a/includes/DatabaseOracle.php b/includes/DatabaseOracle.php index ddda0ef264..1fd2d91b8e 100644 --- a/includes/DatabaseOracle.php +++ b/includes/DatabaseOracle.php @@ -135,11 +135,12 @@ class DatabaseOracle extends Database { * If the failFunction is set to a non-zero integer, returns success */ function open( $server, $user, $password, $dbName ) { - # Test for Postgres support, to avoid suppressed fatal error if ( !function_exists( 'oci_connect' ) ) { throw new DBConnectionError( $this, "Oracle functions missing, have you compiled PHP with the --with-oci8 option?\n (Note: if you recently installed PHP, you may need to restart your webserver and database)\n" ); } + # Needed for proper UTF-8 functionality + putenv("NLS_LANG=AMERICAN_AMERICA.AL32UTF8"); $this->close(); $this->mServer = $server;