Problem in displaying the Japanese character
807589Dec 30 2008 — edited Jan 8 2009Hi
Im trying to display the Japanese characters in pdf report(Using iText Report). I have the method as follows which is encoding the characters in a particular format in my say, Reports.java
public String stringFormat( String strData ) throws Exception {
String result=null;
try{
result = new String(strData.toString().getBytes("Shift-JIS"),"UTF-8");
}catch(Exception e) {}
return result;
}
Im calling this method to display a category code in another one java file like
Phrase colm_2 = new Phrase(report.stringFormat(strCatgdes),font);
But Im nt getting the correct japanese chars, instead im seeing like this ??????? in my pdf report. I tried with different encoding char set like "ISO2022JP,EUC_JP,SJIS,Shift-JIS,MS932,Cp33722". All giving the wrong characters.
Can anyone help me to solve this issue?
Thanks in Advance.