--- typo3_src-4.5.0.trunk/t3lib/utility/class.t3lib_utility_command.php 2011-01-31 13:30:04.000000000 +0100 +++ typo3_src-4.5.0.new/t3lib/utility/class.t3lib_utility_command.php 2011-01-31 13:24:52.000000000 +0100 @@ -46,7 +46,14 @@ * @return null|array */ public static function exec($command, &$output = NULL, &$returnValue = 0) { + if ($GLOBALS['TYPO3_CONF_VARS']['SYS']['UTF8filesystem']) { + $currentLocale = setlocale(LC_CTYPE, 0); + setlocale(LC_CTYPE, $GLOBALS['TYPO3_CONF_VARS']['SYS']['systemLocale']); + } $lastLine = exec($command, $output, $returnValue); + if ($GLOBALS['TYPO3_CONF_VARS']['SYS']['UTF8filesystem']) { + setlocale(LC_CTYPE, $currentLocale); + } return $lastLine; } @@ -78,12 +85,12 @@ // Compile the path & command if ($im_version === 'gm') { $switchCompositeParameters = TRUE; - $path = escapeshellarg($path . 'gm' . $isExt) . ' ' . $command; + $path = escapeshellcmd($path . 'gm' . $isExt) . ' ' . $command; } else { if ($im_version === 'im6') { $switchCompositeParameters = TRUE; } - $path = escapeshellarg($path . (($command == 'composite') ? $combineScript : $command) . $isExt); + $path = escapeshellcmd($path . (($command == 'composite') ? $combineScript : $command) . $isExt); } // strip profile information for thumbnails and reduce their size