title: PHP - Windows - filename incorrect after upload (ü saved as Ã¼ etc.)
body: <p>I have this home made app that allows multiple file uploads, I pass the files to php with AJAX, create new dir with php, move there uploaded files and save the dir location to database. Then to see the files I run listing of the directory location saved in the db.</p>
  
  <p>The problem is that files come from all around the world so very often they have some non latin characters like for example ü. When I echo the filename in php names appear correctly even when they have names written in Arabic, yet they are being saved on the server with encoded names as for example Ã¼ in place of ü. When I list the files from directory I can see the name ü.txt insted of Ã¼.txt but when I click on it server returns error object not found (since on the server it is saved as Ã¼.txt and it reads the link as ü.txt).</p>
  
  <p>I tried some of the suggested solutions as for example using iconv, but the filenames are still being saved the same way.</p>
  
  <p>I could swear the problem wasn't present when the web app was hosted on linux, but at the moment I am not so sure about it anymore. Right now I temporarily run it on xampp (on Windows) and it seems like filenames are saved using windows-1252 encoding (default Windows' encoding on the server). Is it default Windows encoding related problem?</p>
  
  <p>To be honest I do not know how to approach that problem and I would appreciate any help. Should I keep on trying to save the files in different character encoding or would it be better to approach it different way and change the manner of listing the already saved and encoded files?</p>
  
  <p>EDIT. According to the (finally) closed <a href="https://bugs.php.net/bug.php?id=47096" rel="nofollow noreferrer">bug report</a> it was fixed in php 7.1.</p>