From ffb31aa9f75296c04e8d4c35477b3a0b11011ed7 Mon Sep 17 00:00:00 2001 From: Albert Santoni Date: Thu, 28 Nov 2013 15:37:05 -0500 Subject: [PATCH] CC-5583: Force database to be UTF8 regardless of terminal locale --- install_minimal/include/AirtimeInstall.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/install_minimal/include/AirtimeInstall.php b/install_minimal/include/AirtimeInstall.php index caf538409..bb4c27268 100644 --- a/install_minimal/include/AirtimeInstall.php +++ b/install_minimal/include/AirtimeInstall.php @@ -224,7 +224,7 @@ class AirtimeInstall return true; } - $command = "su postgres -c \"createdb $database --encoding UTF8 --owner $username\""; + $command = "sudo -i -u postgres psql postgres -c \"CREATE DATABASE ".$database." WITH ENCODING 'UTF8' TEMPLATE template0 OWNER ".$username."\""; @exec($command, $output, $results); if ($results == 0) {