I have an issue with php rename function, it fail if file name is in Arabic words with spaces.
e.g.
rename(temp/أم كلثوم ثوار - ثوار.mp3,audio/
This Sample Should Helps , I Test Bellow Code And It Works In Windows For Arabic/Persian Names:
$newname = $filename = iconv("utf-8", "cp1256","گچپژ"); echo rename("1.txt", $newname);