Win a copy of Modern JavaScript for the Impatient this week in the Server-Side JavaScript and NodeJS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

primefaces and hibernate and utf-8

 
Ranch Hand
Posts: 127
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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);
}
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic