summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rwxr-xr-xlib/rddb.pm3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/rddb.pm b/lib/rddb.pm
index 7a885be..b8188e2 100755
--- a/lib/rddb.pm
+++ b/lib/rddb.pm
@@ -21,6 +21,9 @@ sub opendb
my $dbh = DBI->connect("DBI:mysql:$dbname:$dbhost","$dbuser","$dbpasswd")
or return (undef, 'ERROR', "Database Error: " . $DBI::errstr);
+ $dbh->do(qq{SET CHARACTER SET utf8;})
+ or return (undef, 'ERROR', "Database Error: " . $dbh->errstr);
+
return ($dbh, 'OK', 'success');
}