Getting Arabic text in unicode
Hi All,
Need a help On:
Getting Arabic Text typed in a Text field on JSP page.(STRUTS application)
I have set Font for textField as one arabic (using CSS).
When i type in it..it shows Arabic characters.
Now I need to display that arabic characters on next page..and also need to store in DB. DB column is of varchar2.
Can someone help in telling me adopting right approach and steps involved?
thanks
raminder.singh
# 1
SEE BELOW:
Hi All,
Need a help On:
Getting Arabic Text typed in a Text field on JSP page.(STRUTS application)
>> MAKE SURE YOU SET THE CHARACTER SET OF YOUR JSP TO UTF-8
I have set Font for textField as one arabic (using CSS).
When i type in it..it shows Arabic characters.
Now I need to display that arabic characters on next page..
>> NEXT PAGE MEANS, THAT YOU SUTMIT YOUR FIRST JSP AND THAN GO TO THE NEXT JSP - RIGHT?
BY THIS OPERATION, YOU ENTER THE JAVA WORLD. THIS MEANS, THAT YOUR INPUT MUST BE CONVERTED FROM DEFAULT UNICODE TO UTF-8. OVERWRITE FOR EXAMPLE YOUR STRUTS FORM BEAN PROPERTY OF YOUR FIELD LIKE THIS:
frm.setXyz(new String(frm.getXyz().getBytes("ISO-8859-1"), "UTF-8"));
ARRIVING IN THE NEXT PAGE, YOU SHOULD SEE THE RIGHT VALUES ...
and also need to store in DB. DB column is of varchar2.
>> YOUR DB SHOULD SUPPORT UTF-8 CHARACTERSET. EITHER YOU INSTALL YOUR DB WITH THIS CHARACTERSET, OR YOU SHOULD ALSO BE ABLE TO ALTER THE CHARACTERSET OF AN EXISTING TABLE.
Can someone help in telling me adopting right approach and steps involved?
>> I HOPE THIS WILL HELP :)
thanks
raminder.singh
>> WELLCOME.
Amir-Amsterdam
j-ama at 2007-7-9 5:36:10 >
