PHP upload filename in arabic showing special characters in folder

575 Views Asked by At

I am using CodeIgnitor PHP and uploading an excel file in a folder in IIS server. For the files that have English naming convention is working file and uploading ok but whenever the files names come in Arabic for example: اسم ملف العينة.xls after uploading on the folder it is showing like this اسم_ملÙ_العينة_1516170951.xlsx

My database and page all are set to UTF-8 with meta tag also.

I need it to show with the same Arabic name inside folder. Any help!

1

There are 1 best solutions below

0
On

You are using windows OS. So, You are facing this type of issue.

I have also faced the same issue right now (using PHP 5.3 and Codeigniter 2). Files named in English were uploading just fine and I was able to download them also. The reason it can`t work for Arabic because you are using Windows OS. All I know this has something to do with the windows file system,

In the uploads folder you will see file names for Arabic files like "اسم_ملÙ_العينة_1516170951.xlsx" but if you run scandir() in php as mentioned by Phil you will see the Arabic names like "اسم ملف العينة.xls".