From 2544a80de11fcbe4d3a95956239f246586b5c7e0 Mon Sep 17 00:00:00 2001 From: patrickslee Date: Sun, 23 Apr 2006 23:39:56 +0000 Subject: [PATCH] PostgreSQL 8 compatibility fix for database character set detecting --- install.php | 2 +- lib/setuplib.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/install.php b/install.php index ff3c6817b0..72f7990997 100644 --- a/install.php +++ b/install.php @@ -329,7 +329,7 @@ if ($INSTALL['stage'] == DATABASE) { $rs = $db->Execute("SHOW server_encoding"); if ($rs && $rs->RecordCount() > 0) { $encoding = $rs->fields['server_encoding']; - if (strtoupper($encoding) != 'UNICODE') { + if (strtoupper($encoding) != 'UNICODE' || strtoupper($encoding) != 'UTF8') { $errormsg = get_string('dbwrongencoding', 'install', $encoding); $nextstage = DATABASE; $INSTALL['showskipdbencodingtest'] = true; diff --git a/lib/setuplib.php b/lib/setuplib.php index 53355f2cef..f0bfc1d56a 100644 --- a/lib/setuplib.php +++ b/lib/setuplib.php @@ -108,7 +108,7 @@ function setup_is_unicodedb() { $rs = $db->Execute("SHOW server_encoding"); if ($rs && $rs->RecordCount() > 0) { $encoding = $rs->fields['server_encoding']; - if (strtoupper($encoding) == 'UNICODE') { + if (strtoupper($encoding) == 'UNICODE' || strtoupper($encoding) == 'UTF8') { $unicodedb = true; } } -- 2.39.5