Display Unicode value in JTextField
I have a column in oracle table having data type as NCHAR, and carrying value in UNICode (i.e. its a person name in urdu language).
Right now I retrieved the above column value from oracle by using below statement:
ResultSet rs = ((OracleCallableStatement)stmt).getCursor(2);
setDataArray(rs.getString(1));// Ignore this line; its working fine
setDataArray(rs.getString(2));//Ignore this line; its working fine
Reader name_native = rs.getCharacterStream(3);
Now, I don't know how to convert above Reader object for JTextField to display Unicode value.
Therefore, its my request to help me to resolve this issue, or may be I am not on the right path then please suggest me what to do; to accomplish the task i.e. display urdu in JTextField.
Looking forward to your kind and positive response.
Re: Display Unicode value in JTextField
What's wrong with JTextField.setText(rs.getString(3)) ?
In Java, Strings *are* Unicode:
Chapter*4.*Types, Values, and Variables