Hibernate version:
3.0.5
Hi,
here is my code where i'am using unicode characters:
Code:
name="Petr Čáp";
System.out.println(">>>> " + name);
Query result = session.createQuery("select c from User as c where name = '" + name +"'");
ant here is what i'm getting in console:
Code:
>>>> Petr Čáp
Hibernate: select user0_.id as id, user0_.name as name0_, user0_.password as password0_, user0_.role as role0_ from user user0_ where name='Petr Äáp'
so nobody is found in database.
Source is in UTF-8 and I tried these url to connect:
url="jdbc:mysql://localhost/domas?useUnicode=true&characterEncoding=utf8&characterSetResults=utf8"
url="jdbc:mysql://localhost/domas?useUnicode=true&characterEncoding=UTF-8&characterSetResults=UTF-8"
Can anynody help to solve this problem?
Thank you