diff --git a/core/cmdbsource.class.inc.php b/core/cmdbsource.class.inc.php index 8c0e72409..13ac98f8f 100644 --- a/core/cmdbsource.class.inc.php +++ b/core/cmdbsource.class.inc.php @@ -98,7 +98,7 @@ class CMDBSource public static function CreateDB($sSource) { - self::Query("CREATE DATABASE `$sSource`"); + self::Query("CREATE DATABASE `$sSource` CHARACTER SET utf8 COLLATE utf8_unicode_ci"); self::SelectDB($sSource); } diff --git a/core/metamodel.class.php b/core/metamodel.class.php index 6e053ea56..acd8003c4 100644 --- a/core/metamodel.class.php +++ b/core/metamodel.class.php @@ -2079,7 +2079,7 @@ abstract class MetaModel if (!CMDBSource::IsTable($sTable)) { $aErrors[$sClass][] = "table '$sTable' could not be found into the DB"; - $aSugFix[$sClass][] = "CREATE TABLE `$sTable` (`$sKeyField` INT(11) NOT NULL $sAutoIncrement PRIMARY KEY) ENGINE = innodb"; + $aSugFix[$sClass][] = "CREATE TABLE `$sTable` (`$sKeyField` INT(11) NOT NULL $sAutoIncrement PRIMARY KEY) ENGINE = innodb CHARACTER SET utf8 COLLATE utf8_unicode_ci"; } // Check that the key field exists //