Project

General

Profile

« Previous | Next » 

Revision 1897

Added by Dietmar over 11 years ago

  1. SqlImport removes BOM in sql files in a Windows Environment
    otherwise you have an error in your SQL syntax;

View differences:

WbDatabase.php
421 421
		$aReplace = array($this->sTablePrefix, $sEngine, $sCollation);
422 422
		$sql = '';
423 423
		$aSql = file($sSqlDump);
424
//		$aSql[0] = preg_replace('/^\xEF\xBB\xBF/', '', $aSql[0]);
425
		$aSql[0] = preg_replace('/^[\xAA-\xFF]{3}/', '', $aSql[0]);
424 426
		while ( sizeof($aSql) > 0 ) {
425 427
			$sSqlLine = trim(array_shift($aSql));
426 428
			if (!preg_match('/^[-\/]+.*/', $sSqlLine)) {
427 429

  

Also available in: Unified diff