UTF-8 pour les connexions MySQL

tags/0.1.3
Daniel Berteaud 12 years ago
parent 6a89bb0203
commit b56e73795a
  1. 3
      root/usr/share/qpsmtpd/plugins/logging/log2sql

@ -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

Loading…
Cancel
Save