File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JSF and the fly likes primefaces and hibernate  and utf-8 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSF
Bookmark "primefaces and hibernate  and utf-8" Watch "primefaces and hibernate  and utf-8" New topic
Author

primefaces and hibernate and utf-8

hassan ali
Ranch Hand

Joined: Apr 23, 2006
Posts: 127
hi


i am using primeface3.3 with hibernate 4.1.7
to bulid news site in arabic


when i save data in arabic in mysql 5

i am trying to rerive variable from it is object

i try some thing like object.title

i found it appere as ???

this part of hibernate.cfg.xml file

jdbc:mysql://localhost/news_papper?characterEncoding=UTF-8</property>
<property name="hibernate.connection.characterEncoding">UTF-8</property>
<property name="hibernate.connection.charSet">UTF-8</property>



this section of java file


List<Image_entity> list = query2.list();

Iterator iterator = objectList.iterator();

while(iterator.hasNext()){
Image_entity obj = (Image_entity)iterator.next();
System.out.println(obj.file);
System.out.println(obj.title);
}
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: primefaces and hibernate and utf-8