I'm building WordPress plugin and need to move files extracted from rar to wp-uploads but copy function fails with failed to open stream: No such file or directory
.
I opened xdebug tool in Atom editor to see what is going on. Xdebug says that filename of file I'm trying to copy is 2016-04-01_CZTERY KDTY_538589020.jpg
where original name (the one on my drive) is 2016-04-01_CZTERY KĄTY_538589020.jpg
. It all fails because of wrong encoding.
How can I check encoding of file name and set it properly?