0
**

How to get Hindi content stored in informix database in JAVA code? How to display Hindi content in Jasper ireport? Stored content in database is showing as ??????????????????????????????????????'

My code is :

String sql="";
      sql="select template from ropk_sms where template_id=1307165174435759958";
          List<Map> getRecords = jdbcTemplateObject.queryForList(sql);
          for (Map row :  getRecords){
              Sirkdpe0100ActionBean objBean = new Sirkdpe0100ActionBean();
              Collection c = row.values();
              Iterator itr = c.iterator();
           
              obj = itr.next();
              objBean.setParty_name(obj!= null ?obj.toString().trim():"");
              System.out.println("DATA"+objBean.getParty_name());
              allRecords.add(objBean);          
          }

**

Alex K
  • 22,315
  • 19
  • 108
  • 236

1 Answers1

0

Hindi content should just be a string of characters, like other content in languages.

The fact that your content shows as question marks is likely that you are using the wrong encoding or the font used to display the characters just does not support Hindi characters.

Just make sure all your systems use Unicode and the same encoding type (e.g. UTF-8). To have your database work correctly when sorting results, set the collation to Hindi as well (though I do not know how it is done on Informix). Finally ensure the fonts used for rendering contain glyphs for your characters.

Queeg
  • 7,748
  • 1
  • 16
  • 42