in reply to Re^2: DBI handling special chars like accented ones
in thread DBI handling special chars like accented ones

Ok, I found out a solution.

The patch mentioned on the parent post has no effect for this particular case. I rolled back to DBD-mysql-3.0002. Actually, the fix consists of using the utf8 pragma, and then performing an upgrade in the string, like this:

use utf8; ... my $string = "voilá monsieur"; utf8::upgrade($string); # $string is now ready to be INSERTed by DBI, # but you still need to do this $dbhandle->do("SET CHARACTER SET utf8"); # now you can perform the INSERT