I have big problem in my web application using JSF and EclipseLink JPA to MySQL database.
When I read data from database JSF reads and writes my charachters in UTF-8 OK. but in database characters are bad.
f.e.: input characters: "żźćółzxcv", written in database: "?????zxcv". But if I manually write data to database, for example: "żźćółzxcv", then reading in JSF is perfect.
I tried everything from here: Unicode input retrieved via PrimeFaces input components become corrupted
And I discovered that encoding in JSF is fine, but the problem is in java, becouse if I set manually
current.setUwagiZ("żźćóżźćłąśóżźćł TE");
getFacade().edit(current);
in database record is wrong: ???ó??????ó???? TE
I have set characterEncoding and useUnicode in JDBC Resource. Also when execute commands by some tools in NetBeans encoding is OK and data in MySQL are in UTF-8, so connections seems fine.
So the problem is java, but I completely don't know how to solve this :(