2006 IR Open Dicussion Posted August 27, 2006 Share Posted August 27, 2006 By: Himanshu - himanshugarg Unicode text in Non Static Text Field 2006-07-17 05:26Hello, I am able to display Unicode text alright as static text. However when I get the same from a Resource Bundle I see junk characters. What must I do. Thank You, Himanshu. PS:- IPC_hi_IN.properties 1=कà¥à¤› नहीं 13=हतà¥à¤¯à¤¾ Bundle.java import java.util.*; public class Bundle { public static String getString(String head, Integer key, Locale lc) { String s = null; try { ResourceBundle rb = ResourceBundle.getBundle(head, lc); s = rb.getString(key.toString()); } catch (MissingResourceException e) { System.out.println(" " + e); s = null; } return s; } public static void main(String args[]){ Locale lc = new Locale("hi", "IN"); System.out.println(Bundle.getString("IPC", 13, lc)); } } Extract from jrxml <textFieldExpression class="java.lang.String"><![CDATA[bundle.getString("IPC", $F{category}, new Locale("hi", "IN"))]]></textFieldExpression> 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