I have 2 projects that both use a same mySQL database. One is a Master/Detail desktop application, the other one is a JSF Crud using PrimeFaces-4.0. - Although my JDBC Connection is UTF-8 as:
jdbc:mysql://localhost:3306/db_name?useUnicode=yes&characterEncoding=UTF-8
But I still get '?' characters into my DB when I input non-English Strings!
I had the same issue when we started to use Hibernate. Assing additional configuration to the connection URL didn't solve the problem, however we did add the following properties
<property name="hibernate.connection.characterEncoding">utf8</property>
<property name="hibernate.connection.useUnicode">true</property>
<property name="hibernate.connection.charSet">UTF-8</property>
and that what solve the problem. Try removing parameters from URL string and leave it be so it would be just like
jdbc:mysql://localhost:3306/db_name
I hope it will solve your problem.
EDIT: I just noticed that you are not using Hibernate at all so this will not help you ;/
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.