title: Encoding problems when importing sql statement from file
body: <p>I have encountered a problem, when i try to execute a sql statement I have stored in a file. The problem is that special characters like æøå becomes gibberish when they are imported to the database.</p>
  
  <p>I use the code below:</p>
  
  <pre><code>$dsn = 'mysql:host='.DBHOST.';dbname='.DBBASE;
  $db = new PDO($dsn, DBUSER, DBPASS);
  //$db-&gt;exec("set names 'utf8'");
  
  $sql = "TRUNCATE TABLE wtm_meta_language";
  $db-&gt;exec($sql);
  
  $sql = file_get_contents('language.sql');
  
  $db-&gt;exec($sql);
  </code></pre>
  
  <p>The language.sql file is encoded in UTF-8 and so is the database.
  I have tried to force the database connection to use utf-8 by adding "set names 'utf8'" to my code (row 3, that is now a comment), but when I add this row nothing gets imported at all.</p>
  
  <p>I hope someone has an idea to how to solve this.</p>