> In my connection string, I set explicitly "characterset=utf8". And before querying for any data, I send the command "SET NAMES UTF8". I searched the web and that seems all I have to do to make utf8 fields work.
Those announce to the database server that the bytes you are about to send it, and the bytes you want to get back from it, shall be utf8-encoded. I guess that they are not.
This discusses how to determine if the bytes in your tables are ut8-encoded, or if they were stored incorrectly.
http://mysql.rjweb.org/doc.php/charcoll
Talk us through where the text comes from, how it flows through your application and is put into the database. Then explain how it comes back put, and how you put it out, getting gibberish.