Permalink
Browse files

Added 'PDO::MYSQL_ATTR_INIT_COMMAND' UTF-8 flag to the PDO constructo…

…r | closes #77
  • Loading branch information...
1 parent f49abf0 commit dce95a0765e348343e1af755d8ac01268b445abf @jasonrhodes jasonrhodes committed May 25, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/frapi/library/Frapi/Database.php
@@ -60,7 +60,8 @@ protected static function factory($name = 'default')
self::$instance[$name] = new PDO(
$dsn,
$configs['db_username'],
- $configs['db_password']
+ $configs['db_password'],
+ array(PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES \'utf8\'')
);
}
}

0 comments on commit dce95a0

Please sign in to comment.