I have a problem that I have not been able to resolve so far. When I use the copy()
function of php, the file that is copied from one place to another causes files that have an accent to be mischaracterized as to its name.
I'm using IIS 10 in Windows 10 and PHP 5.3.9.
copy(string $source , string $dest);
I already printed the $dest
and the names exited correctly, but when the function is executed I will check in the destination folder the file is with its entire name decharacterized according to the name below an XML file that the correct name would be Padrão José e Porâ.xml
( I'm using these accents for testing purposes.)
Padrão_josé_e_porâ.xml
(Wrong file name)
I know that the copy()
function has a third parameter for stream_context_create()
but I could not find examples of using this parameter to be used locally.
The error happens after the function is executed , in other words, the file that is copied from one place to another has an uncharacterized accent, the reason I do not know because I pass the correct name in the variable $dest
.
I've also added header('Content-Type: text/html; charset=utf-8');
to the PHP file.
Any thoughts?
Thank you.