Mini AJAX File Upload Form reopen for UTF-8


I use the excellent mini Ajax File Upload but I have a lot of difficulties because the files names are not written in UTF-8 in the target directory

I do that

This is really a very good script. But I have a problem in the file name when saving. How can I save a file in UTF-8 encoding
Vinbongun 3 years ago

If you want the name of the file saved in utf-8, then you need to add a line in upload.php.
$_FILES['upl']['name'] = iconv("utf-8", "windows-1251", $_FILES['upl']['name']);
$extension = pathinfo($_FILES['upl']['name'], PATHINFO_EXTENSION);

But infortunetly that's not ok

so I modify using this without success

$extension = pathinfo($_FILES['upl']['name'], PATHINFO_EXTENSION);
$_FILES['upl']['name'] = htmlentities($_FILES['upl']['name'], ENT_QUOTES, mb_detect_encoding($_FILES['upl']['name']));

I need HELP

Thank You

Comments 0