Index: /FCKeditor/trunk/_dev/releaser/fckreleaser.php
===================================================================
--- /FCKeditor/trunk/_dev/releaser/fckreleaser.php	(revision 226)
+++ /FCKeditor/trunk/_dev/releaser/fckreleaser.php	(revision 227)
@@ -349,5 +349,5 @@
 function StrEndsWith( $str, $sub )
 {
-   return ( substr( $str, strlen( $str ) - strlen( $sub ) ) == $sub ) ;
+	return ( substr( $str, strlen( $str ) - strlen( $sub ) ) == $sub ) ;
 }
 
@@ -363,5 +363,5 @@
 {
 	$dirParts = explode( '/', $path ) ;
-	
+
 	$currentDir = '' ;
 
@@ -369,5 +369,5 @@
 	{
 		$currentDir .= $dirPart . '/' ;
-		
+
 		if ( strlen( $dirPart ) > 0 && !is_dir( $currentDir ) )
 			mkdir( $currentDir, $rights ) ;
@@ -385,22 +385,5 @@
 		fwrite( $f, "\xEF\xBB\xBF" ) ;	// BOM
 
-	fwrite( $f, $strData ) ;
-	fclose( $f ) ;
-
-	return TRUE ;
-}
-
-function SaveStringToUtf8File( $strData, $filePath, $includeBom = TRUE )
-{
-	$f = @fopen( $filePath, 'wb' ) ;
-
-	if ( !$f )
-		return FALSE ;
-
-	if ( $includeBom )
-		fwrite( $f, "\xEF\xBB\xBF" ) ;	// BOM
-
-	fwrite( $f, ( $strData ) ) ;
-
+	fwrite( $f, StripUtf8Bom( $strData ) ) ;
 	fclose( $f ) ;
 
@@ -954,8 +937,8 @@
 	function ProcessFile( $sourceFilePath, $destinationFilePath, $onlyHeader = FALSE )
 	{
-		SaveStringToUtf8File(
+		SaveStringToFile(
 			FCKPreProcessor::Process( file_get_contents( $sourceFilePath ), $onlyHeader ),
 			$destinationFilePath,
-			( !StrEndsWith( $sourceFilePath, '.asp' ) && !StrEndsWith( $sourceFilePath, '.js' ) ) ) ;	// Only ASP and JavaScript files require the BOM.
+			( StrEndsWith( $sourceFilePath, '.asp' ) || StrEndsWith( $sourceFilePath, '.js' ) ) ) ;	// Only ASP and JavaScript files require the BOM.
 
 		// Set the destination file Last Access and Last Write times.
