Skip to content

Commit

Permalink
Setting encoding to MySQL connection to UTF-8
Browse files Browse the repository at this point in the history
  • Loading branch information
George Borges committed Jan 7, 2015
1 parent 3ccec7e commit 579506a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Persister/PDO/MysqlPersister.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,8 @@ protected function getConnection()
try {
$dsn = $this->config['driver']
. ':host=' . $this->config['host']
. ';dbname=' . $this->config['database'];
. ';dbname=' . $this->config['database']
. ';charset=utf8';

$this->conn = new PDO($dsn, $this->config['username'], $this->config['password']);
$this->conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
Expand Down

0 comments on commit 579506a

Please sign in to comment.