According to the MySQL JDBC documentation, you also need to set the character encoding to the JDBC connection URL. Here is an example:
jdbc:mysql://localhost:3306/db_name?useUnicode=yes&characterEncoding=UTF-8
Otherwise, the MySQL JDBC driver will use the standard platform encoding to convert characters to bytes before sending over the network, which in your case, apparently, is not UTF-8. All uncovered characters will be replaced by question marks.
In addition, when receiving data, you must make sure that the console / file in which you display / write characters also supports / uses UTF-8. Otherwise, they will also become question marks. How to fix this depends on how / where you display / write these characters.
See also:
By the way, you do not need a SET NAMES query.
source share