I know there are similar questions about this topic, but unfortunately none have solved my problem
I simply want to rename a file that has an Arabic filename
For example a file named 'ملف.txt' definetly existing in the same folder I have my script in
rename('ملف.txt','File.txt');
This Gives: rename(ملف.txt,File.txt) [function.rename]: No such file or directory
After some googling I learned that I must use:
$temp = iconv('utf-8', 'cp1252', 'ملف.txt');
rename($temp,'File.txt');
This Gives:
rename(,File.txt) [function.rename]: Illegal byte sequence
I also tried using urlencode but that gave:
rename(%D9%85%D9%84%D9%81.txt,File.txt) [function.rename]: No such file or directory
Some help would be appreciated