title: PHP file upload -> replace special chars didn't work
body: <p>I'm now searching for a solution for two hours, but nothing I found online helped...</p>
  
  <p>I have a webservice with an upload form, which both work fine. I'm more into JS, my whole service is built in HTML5, CSS3 and JS... but my Upload Form is PHP. I found a script online and it worked, so I was fine. Now I realized, that there is a problem with my service, when I want to upload files with chars like ä,ö,ü and ß. Unfortunately here in Germany these are common chars in our language, so I have to replace them with other chars. </p>
  
  <p>I had a look here and there and at the moment my code looks like this:</p>
  
  <pre><code>$files = $_FILES['fileselect'];
  
  foreach ($files['error'] as $id =&gt; $err) {
      if ($err == UPLOAD_ERR_OK) {
  
          $fn = $files['name'][$id];
  
          $search_array  = array ('ä', 'ö', 'ü', 'ß');
          $replace_array = array ('ae', 'oe', 'ue', 'ss');
  
          $gfn = str_replace($search_array, $replace_array, $fn);
  
          move_uploaded_file(
              $files['tmp_name'][$id],
              'bildtransfer/' . $gfn
          );
  
          echo "&lt;p&gt;Die Datei $gfn wurde hochgeladen.&lt;/p&gt;";
      }
  }
  </code></pre>
  
  <p>The upload itself still works with files as long as they don't have those special chars. My file still has all special chars and it seems like there haven't been any replacement? </p>
  
  <p>Do I need preg_replace instead of str_replace? I tried it, but it didn't work either...</p>
  
  <p>I hope you can help me? Would be very pleased!!! :)</p>