From 67a96dcaf091d9a316316484859461886df28504 Mon Sep 17 00:00:00 2001 From: River Tarnell Date: Sun, 11 Mar 2007 19:19:49 +0000 Subject: [PATCH] set $NLS_LANG before connecting so Oracle knows we're using UTF-8 --- includes/DatabaseOracle.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- 2.20.1