use Encode qw(encode_utf8 decode_utf8); ... $sth->execute($nick, encode_utf($quote));