Browse Source

Forcing DEFAULT CHARACTER SET utf8 when creating the database see #5307

Julio Montoya 12 years ago
parent
commit
0914e97f79
1 changed files with 2 additions and 1 deletions
  1. 2 1
      main/install/install_db.inc.php

+ 2 - 1
main/install/install_db.inc.php

@@ -77,7 +77,8 @@ if (!defined('CLI_INSTALLATION')) {
     }	
 	//Create database
 	if ($create_database) {
-		$sql = "CREATE DATABASE IF NOT EXISTS `$mysqlMainDb`";
+        $charset_clause = ' DEFAULT CHARACTER SET utf8 DEFAULT COLLATE utf8_general_ci';
+		$sql = "CREATE DATABASE IF NOT EXISTS `$mysqlMainDb` $charset_clause";   
 		Database::query($sql) or die(Database::error());
 	}	
 }