diff options
author | Christian Pointner <equinox@helsinki.at> | 2014-09-19 10:19:06 (GMT) |
---|---|---|
committer | Christian Pointner <equinox@helsinki.at> | 2014-09-19 10:19:06 (GMT) |
commit | bb84ce3d7e580247aaabd5440fe15a25206a40ed (patch) | |
tree | 515ce2f8fe099be50f19ff966b060ee5b0bff018 /lib | |
parent | f100a9f323461393b0f7a3e509728ca4256489b7 (diff) |
utf8 for everybody!
Diffstat (limited to 'lib')
-rwxr-xr-x | lib/rddb.pm | 3 |
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'); } |