Detect Oracle Database Encoding in order to set CFG->unicodedb properly

This commit is contained in:
stronk7
2006-09-22 17:23:09 +00:00
parent 721b750ff4
commit 0700134df5
+10 -1
View File
@@ -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;
}
?>