From: stronk7 Date: Fri, 22 Sep 2006 17:23:09 +0000 (+0000) Subject: Detect Oracle Database Encoding in order to set CFG->unicodedb properly X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=0700134df5885fa704c710be1b9f79d5c83e346b;p=moodle.git Detect Oracle Database Encoding in order to set CFG->unicodedb properly --- diff --git a/lib/setuplib.php b/lib/setuplib.php index 3d9834b8cd..4ac9ef33af 100644 --- a/lib/setuplib.php +++ b/lib/setuplib.php @@ -121,9 +121,18 @@ function setup_is_unicodedb() { /// MSSQL only runs under UTF8 + the proper ODBTP driver (both for Unix and Win32) $unicodedb = true; break; + case 'oci8po': + /// Get Oracle DB character set value + $rs = $db->Execute("SELECT parameter, value FROM nls_database_parameters where parameter = 'NLS_CHARACTERSET'"); + if ($rs && $rs->RecordCount() > 0) { + $encoding = $rs->fields['value']; + if (strtoupper($encoding) == 'AL32UTF8') { + $unicodedb = true; + } + } + break; } return $unicodedb; } - ?>