title: php exec with special chars
body: <p>in my script I'm running the find command via PHPs exec function. </p>
  
  <pre><code>setlocale(LC_CTYPE, "de_CH.UTF-8");
  $searchString = escapeshellarg("*$searchString*");
  $searchDirectory = escapeshellarg($searchDirectory);
  $result = array();
  exec("find $searchDirectory -type f -iname $searchString", $result);
  </code></pre>
  
  <p>There are some files with special charactes (e.g. ä, ö, ü) in their name and I want the user to be able to search for those files too. When I hard code the search like</p>
  
  <pre><code>exec("find $searchDirectory -type f -iname '*ä*'", $result);
  </code></pre>
  
  <p>I get the expected results back. But as soon as I use the user input it doesn't work as expected. I have already tried avoiding the passing of the parameter to escapeshellarg because I thought it might has problems with UTF-8 strings but the result was the same.</p>
  
  <p>Has anyone an idea what the problem could be?</p>