Reputation: 96
I am using mysql query browser to store the following names in the Person table which contains fields of personNumber and personName. I have the character set of personName at utf-8 and if i insert the name via query browse the query is running correctly but when i try that via JDBC or JPA, the name's special characters become the '?'. What is the problem here?...
The names are 1.Năstase 2.Hrustanović 3.Ogris-Martič and some similar names.
Upvotes: 2
Views: 2076
Reputation: 1211
Try this code
jdbc:mysql://localhost:3306/MY_DB?useUnicode=yes&characterEncoding=UTF8
Upvotes: 2
Reputation: 102428
Have you set your connection string correctly?
jdbc:mysql://localhost:3306/administer?characterEncoding=utf8
Upvotes: 2