title: Incorrect encoding from PHP?
body: <p>1) I have a table <code>tbl_Data</code> in database which has <code>name</code> column with text comparision method (?) property set to<code>utf8_polish_ci</code>. Works as a charm, when I'm browsing <code>tbl_Data</code> through phpMyAdmin.</p>
  
  <p>2) In my html code I've got:</p>
  
  <pre><code>&lt;!DOCTYPE HTML&gt;
  &lt;html&gt;
  &lt;head&gt;
  &lt;meta charset="UTF-8"&gt;
  </code></pre>
  
  <p>so seems like I'm sending proper encoding headers for browser...</p>
  
  <p>3) My PDO dsn contains <code>;charset=UTF-8</code>, followed from php manual.</p>
  
  <p>4) In my php code I use:</p>
  
  <pre><code>foreach(parent::query('SELECT ID,PLName,LatinName from tbl_Data') as $row) {
      $result = $result."
          &lt;tr&gt;
              &lt;td&gt;".utf8_encode($row['PLName'])."&lt;/td&gt;
          &lt;/tr&gt;
      ";
  }
  </code></pre>
  
  <p>Having all of this I'm still getting 'garbage' (=<code>?</code>) chars instead of proper polish letters, though some of them are displaying well (phpMyAdmin shows all properly). What I am missing here? Please advice, fellows!</p>
  
  <p>My MySQL Engine is <code>InnoDB</code>, webserver: <code>nginx</code> with fpm if it is revelant...</p>