From 0700134df5885fa704c710be1b9f79d5c83e346b Mon Sep 17 00:00:00 2001 From: stronk7 Date: Fri, 22 Sep 2006 17:23:09 +0000 Subject: [PATCH] Detect Oracle Database Encoding in order to set CFG->unicodedb properly --- lib/setuplib.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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; } - ?> -- 2.39.5