UTF-8 pour les connexions MySQL

This commit is contained in:
Daniel Berteaud 2012-10-14 20:43:17 +02:00
parent 6a89bb0203
commit b56e73795a
1 changed files with 3 additions and 0 deletions

View File

@ -58,6 +58,9 @@ sub connect_handler {
$self->log(LOGDEBUG,"DSN:$dsn");
$dbh = DBI->connect($dsn,$user,$passwd) || $self->log(LOGERROR,DBI::errstr);
# Use UTF8
$dbh->do("SET NAMES 'utf8';") || $self->log(LOGERROR,$dbh->errstr());
# generate mail id
$mail_id = $$.'.'.time.'.'.int(rand(10000));
# set note for other plugins