title: Mysql php character set setting
body: <p>At first we was using the default character set by the mysql that was latin1_swedish_ci. Then we had problem with other languages like russian etc. So we have now converted the tables into  collation and the field into utf8_unicode_ci. We need some confirmation here should we stick with utf8_unicode_ci for the support all the possible languages or go for something else like utf8_bin?</p>
  
  <p>Next issue for php files where we are using mysqli we have set this.</p>
  
  <pre><code>if (!mysqli_set_charset($link, "utf8")) {
      echo("Error loading character set utf8: ". mysqli_error($link));
    } 
    else {
      echo("Current character set: ". mysqli_character_set_name($link));
    }
  </code></pre>
  
  <p>Then for places where we use mysql only we did as below</p>
  
  <pre><code>mysql_query("SET NAMES 'utf8'");
  mysql_query("SET CHARACTER SET utf8");
  mysql_query("SET COLLATION_CONNECTION = 'utf8_unicode_ci'"); 
  </code></pre>
  
  <p>The problem now we find this is like quite tedious and we are scared we might be miss. Is it possible to set this character setting in like a config file like we have one for our db connection? </p>