title: Insert Values with special Characters using PDO
body: <p>I have problems inserting values with special Characters in names like "Renè". The Name "Renè" shows up in my Database like this: "RenÃ©"</p>
  
  <p>I tried to change the field in the database to "utf8_general_ci" which didn't help, so its probably something in my code.</p>
  
  <p>The name comes from a JQuery Ajax Request and I am able to echo this name inside the called .php file correctly.</p>
  
  <pre><code>$fullname = $_POST['playersearch'];
  echo "&lt;div class='n_ok'&gt;&lt;p&gt;Inserted $fullname successfully (PlayerID is $id)&lt;/p&gt;&lt;/div&gt;";
  </code></pre>
  
  <p>I connect to my DB using PDO and I specified the UTF-8 charset:</p>
  
  <pre><code>$db = new PDO("mysql:host=$dbhost;dbname=$dbname",$dbuser,$dbpass,array('charset'=&gt;'utf8'));
  $db-&gt;setAttribute(PDO::ATTR_EMULATE_PREPARES, false);
  $db-&gt;setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
  </code></pre>
  
  <p>The insert into the DB happens here:</p>
  
  <pre><code>    $stmt = $db-&gt;prepare("INSERT INTO PlayerCards (playerName, buyPercentage) VALUES (?, ?)");
      $stmt-&gt;bindParam(1, $fullname);
      $stmt-&gt;bindParam(2, $buypercentage);
  </code></pre>
  
  <p>Why does it look so weird in my MySQL Database?</p>