title: How to set proper output encoding in PHP
body: <p>I have problem with PHP encoding.</p>
  
  <p>My PHP file is UTF-8 encoded.</p>
  
  <p>But every PHP function does something wrong with encoding:</p>
  
  <p>For example: in my script I can write:</p>
  
  <pre><code>echo 'zażółć gęślą jaźń';
  echo strtolower('zażółć gęślą jaźń');
  </code></pre>
  
  <p>And this is what I get:</p>
  
  <pre><code>zażółć gęślą jaźń
  za���� g��l� ja���
  </code></pre>
  
  <p>No matter what I do or what encoding I use.</p>
  
  <p>I am sure that it can be set somewhere.</p>
  
  <p><code>default_charset</code> in file <em>php.ini</em> is set to UTF-8.</p>