Doc for DBD::mysql states that if not setting
mysql_enable_utf8 as part of the database
connect(), must do it before doing "set names utf8"
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
if ( $db_driver eq 'mysql' ) {
# Koha 3.0 is utf-8, so force utf8 communication between mySQL and koha, whatever the mysql default config.
# this is better than modifying my.cnf (and forcing all communications to be in utf8)
- $dbh->do("set NAMES 'utf8'") if ($dbh);
$dbh->{'mysql_enable_utf8'}=1; #enable
+ $dbh->do("set NAMES 'utf8'");
}
elsif ( $db_driver eq 'Pg' ) {
$dbh->do( "set client_encoding = 'UTF8';" );