Which of this notation is proper in persistence.xml
file for web application in TomEE server with OpenJPA module to connect with MySQL database and set UTF-8 encoding?
<property name="javax.persistence.jdbc.url" value="jdbc:mysql://localhost:3306/db?useUnicode=yes&characterEncoding=UTF-8"/>
(yes and UTF-8)<property name="javax.persistence.jdbc.url" value="jdbc:mysql://localhost:3306/db?useUnicode=true&characterEncoding=utf8"/>
(true and utf8)<property name="javax.persistence.jdbc.url" value="jdbc:mysql://localhost:3306/db?useUnicode=true&connectionCollation=utf8_general_ci/>
For what is property characterSetResults=utf8
? Should I use it to change encoding or not?