in reply to Encoding issue from DBI to string
If you haven't tried this yet, see what happens if you change the first arg in your DBI->connect() call from this:
to this :"DBI:mysql:$db_name1:$db_host1:$db_port1"
"DBI:mysql:$db_name1:$db_host1:$db_port1;mysql_enable_utf8=1"
In Section
Seekers of Perl Wisdom