title: php uploaded file name slug
body: <p>I am trying to change the name of uploaded image.
  Image file name is in Turkish, like Şömine.jpg and i am trying to save it as Somine.jpg BUT str_replace does not work.</p>
  
  <p>Here is my testing code and results;</p>
  
  <pre><code>$img=pathinfo($_FILES['image']['name'], PATHINFO_FILENAME);
  echo $img.PHP_EOL;
  $turkce=array("ö","Ş");
  $duzgun=array("o","S");
  $img=str_replace($turkce,$duzgun,$img);
  echo $img.PHP_EOL;
  
  $img1 = "Şömine";
  $turkce=array("ö","Ş");
  $duzgun=array("o","S");
  $img1=str_replace($turkce,$duzgun,$img1);
  echo $img1.PHP_EOL;
  </code></pre>
  
  <p>And the output;</p>
  
  <pre><code>Şömine
  Şömine
  Somine
  </code></pre>
  
  <p>Everyting is UTF-8 encoded, what can i try to fix it?
  As you can see if i type the text in source works fine but while file upload it does not work.
  Any ideas?</p>