0

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?

GeekDaddy
  • 619
  • 1
  • 10
  • 21
  • Files names always need be in "slug style": more simple, works everywhere and you no have problems with that: "2016-04-01-cztery-katy--538589020.jpg". This is just an advice. – Patrick Maciel Apr 19 '16 at 12:39
  • Is it Windows? If so, this topic may be helpful. http://stackoverflow.com/questions/977635/how-to-open-file-in-php-that-has-unicode-characters-in-its-name Anyway, I would do, what Patrick said. – Jakub Matczak Apr 19 '16 at 12:42

0 Answers0