title: my.ini and mysql_connect encoding
body: <p>Does PHP’s <code>mysql_connect()</code> function use the MySQL <em>my.ini</em> configuration file when it establishes the connection to the MySQL server instance? 
  It seems not.</p>
  
  <p>I have the table with the UTF-8 encoding and the PHP script which connects to the database and inserts data in UTF-8 encoding.</p>
  
  <p>By default the <code>mysql_client_encoding()</code> returns <code>latin1</code>.
  When I use <code>mysql_query("SET NAMES utf8")</code> or <code>mysql_set_charset("utf8")</code> after establishing the connecion, all works fine.</p>
  
  <p>I would like to know is there other way to force use correct encoding for exchange data with MySQL from PHP?</p>