2004 IR Help Posted August 21, 2006 Share Posted August 21, 2006 By: bourridhh - bourridhh Unicode problem 2005-05-06 00:03 Hi, For those who have problem with unicode characters and especially with unicode data extracted from database. I found a solution for the problem I create a method that returns unicode characters from an UTF-8 or ISO string here is: public class ArabicFormatter { public static String formatString(String inputString) { try { return ( EncodeChanger.unicodeEsc2Unicode( new String(inputString.getBytes("ISO8859_1"), "Cp1256"))); } catch (UnsupportedEncodingException e) { return ""; } } } EncodeChanger is part of library that allows conversion from utf-8 to unicode (like u77c) in my jrxml file ArabicFormatter.formatString($F{value}) Dont forget the font and the textField encoding: <reportFont name="Arab" isDefault="true" fontName="Tahoma Bold" size="12" isBold="false" isItalic="false" isUnderline="false" isStrikeThrough="false" pdfFontName="c:\tahomabd.ttf" pdfEncoding="Identity-H" isPdfEmbedded="true"/> Any one wants the PropertiesEditor.jar that contains EncodeChanger class he can ask me ,i ll give it to him Hope it helps thanks Link to comment Share on other sites More sharing options...
afarrag Posted December 3, 2006 Share Posted December 3, 2006 Hello, It would be very kind of you if you could provide me with the PropertiesEditor.jar. I need it to do some tests. Thanks in advance. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now