OSDN Git Service

fix utf8 flag handling betweeen script and BDB::Mysql
authorISHIKAWA Mutsumi <ishikawa@hanzubon.jp>
Thu, 18 Oct 2012 06:25:09 +0000 (15:25 +0900)
committerISHIKAWA Mutsumi <ishikawa@hanzubon.jp>
Thu, 18 Oct 2012 06:25:09 +0000 (15:25 +0900)
mubot4fb.pl

index abe3187..0facb44 100755 (executable)
@@ -42,7 +42,7 @@ sub fb_init {
 
 sub db_init {
        my ($me) = @_;
-       $me->{dbh} = DBI->connect('DBI:mysql:'.$me->{cfg}->{database}, $me->{cfg}->{db_user}, $me->{cfg}->{db_pass}) || die $DBI::errstr;
+       $me->{dbh} = DBI->connect('DBI:mysql:'.$me->{cfg}->{database}, $me->{cfg}->{db_user}, $me->{cfg}->{db_pass},{mysql_enable_utf8 => 1}) || die $DBI::errstr;
 }
 
 sub misc_init {