From b14e89f00c94f60b8dee1f0e3338e6a813f1ea89 Mon Sep 17 00:00:00 2001
From: Demian Katz <demian.katz@villanova.edu>
Date: Thu, 11 Jun 2015 15:44:32 -0400
Subject: [PATCH] Fixed database connection to use UTF-8 encoding. Thanks to
 Abdulsalam Yousef for the fix.

---
 module/VuFind/src/VuFind/ILS/Driver/Koha.php | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/module/VuFind/src/VuFind/ILS/Driver/Koha.php b/module/VuFind/src/VuFind/ILS/Driver/Koha.php
index ef1e3e68941..0129137eb13 100644
--- a/module/VuFind/src/VuFind/ILS/Driver/Koha.php
+++ b/module/VuFind/src/VuFind/ILS/Driver/Koha.php
@@ -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);
-- 
GitLab