characterEncoding in JPA SOLVED!

The idea was to be able to insert Cyrillic characters into mysql DB. The problem was that I was using JPA eclipse-link. It took me some time and a lot of nerves to find the solution. Just add to the persistence.xml, to the url property like this:

property name=”javax.persistence.jdbc.url”

Note the ? sign, not &! And don’t use useEncoding, it will not work. Only like this one.
fuck for not allowing pasting source code.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s