Skip to content

Commit

Permalink
Update WindowsFileSystem.php (#1413)
Browse files Browse the repository at this point in the history
Fixed #1399
  • Loading branch information
siad007 authored Oct 3, 2020
1 parent 58c92cb commit 0ce938a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion classes/phing/system/io/WindowsFileSystem.php
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,11 @@ public function compare(PhingFile $f1, PhingFile $f2)
*/
private function fixEncoding($strPath)
{
$codepage = 'CP' . trim(strstr(setlocale(LC_CTYPE, ''), '.'), '.');
$charSet = trim(strstr(setlocale(LC_CTYPE, ''), '.'), '.');
if ($charSet === 'utf8') {
return $strPath;
}
$codepage = 'CP' . $charSet;
if (function_exists('iconv')) {
$strPath = iconv('UTF-8', $codepage . '//IGNORE', $strPath);
} elseif (function_exists('mb_convert_encoding')) {
Expand Down

0 comments on commit 0ce938a

Please sign in to comment.