title: How to set www-data locale
body: <p>I have a php-file that starts a java process which generates a file and should be called via <code>http://www.servername.com/script.php</code>. When I try <code>php script.php</code> from the console the file gets written correctly. If I start it via the browser there are problems with the encoding of the filename. It seems, that www-data (which is the user of the php script when I start it via the browser) has not the right locale.</p>
  
  <p>Does anyone know how to set the locale for www-data?</p>
  
  <p>I am on ubuntu trusty, php 5.5, java 1.7</p>
  
  <p>Thanks,
  Sven </p>