From: <ex...@us...> - 2014-02-03 09:06:57
|
Revision: 6559 http://sourceforge.net/p/web-erp/reponame/6559 Author: exsonqu Date: 2014-02-03 09:06:53 +0000 (Mon, 03 Feb 2014) Log Message: ----------- 03/02/14 Exson: Add sql statement 'SET names utf8' to make company name which is not alphanumeric display correctly. Modified Paths: -------------- trunk/install/index.php Modified: trunk/install/index.php =================================================================== --- trunk/install/index.php 2014-02-03 09:04:01 UTC (rev 6558) +++ trunk/install/index.php 2014-02-03 09:06:53 UTC (rev 6559) @@ -1126,7 +1126,8 @@ if($DBType == 'mysqli'){//if the mysql db type is mysqli mysqli_select_db($db,$NewDB); //currently there is no 'USE' statements in sql file, no bother to remove them - $sql = file_get_contents($NewSQL); + $sql = 'SET names UTF8;'; + $sql .= file_get_contents($NewSQL); if(!$sql){ die(_('Failed to open the new sql file')); } @@ -1210,7 +1211,7 @@ ($DBType=='mysqli')?mysqli_select_db($db,$dbName):mysql_select_db($dbName,$db); $SQLScriptFile = file($File); $ScriptFileEntries = sizeof($SQLScriptFile); - $SQL =''; + $SQL =' SET names UTF8;'; $InAFunction = false; for ($i=0; $i<$ScriptFileEntries; $i++) { |