开发者

Unicode character not displayed in JasperReports' report

I want to display character \u0141 i.e the 'L' with a stroke. I have appended this unicode to the field to be displayed in the report & it displays fine in the iReport preview PDF. But when I generate the same report from my web application it displays blank i.e the character is not displayed in the pdf. I'm using JasperReports 3.5开发者_StackOverflow社区.3.


Use a custom expression in ireport to solve the issue and in your custom class write the logic to convert unicode to text .

public class Unifun {
   public static String convertunitostring(String s) {
      return StringEscapeUtils.unescapeJava(s);
   }
   public static void main(String args[]) {
      System.out.println(convertunitostring("\ufeff\u0110\u1eaf\u0063\u0020\u004c\u1eaf\u0063"));
   }
}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜