Skip to content
Snippets Groups Projects
Commit b14e89f0 authored by Demian Katz's avatar Demian Katz
Browse files

Fixed database connection to use UTF-8 encoding.

Thanks to Abdulsalam Yousef for the fix.
parent 6092693f
No related merge requests found
......@@ -83,7 +83,8 @@ class Koha extends AbstractBase
';port=' . $this->config['Catalog']['port'] .
';dbname=' . $this->config['Catalog']['database'],
$this->config['Catalog']['username'],
$this->config['Catalog']['password']
$this->config['Catalog']['password'],
[PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8']
);
// Throw PDOExceptions if something goes wrong
$this->db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment