Arabic Text Problem --- Urgent ---

K

Khan

Hi all,

I have a textbox 'remarks' in jsp which has some arabic text.
while pressing the submit button the arabic text is storing in java
string variable.

String rem = request.getParameter("remarks").

but the problem is that, arabic text is saving in java string variable
as strange chars and boxes. because in java message the arabic text is
displaying as boxes.

How can i store that arabic text in java variable in proper form
without appearing as boxes.

Thanx.
 
I

Ike

I believe yo umust use request.getBytes(some_proper_encoding_here) to
convert the string to bytes, then to a string or char array from there.
 
H

hilz

Khan said:
Hi all,

I have a textbox 'remarks' in jsp which has some arabic text.
while pressing the submit button the arabic text is storing in java
string variable.

String rem = request.getParameter("remarks").

but the problem is that, arabic text is saving in java string variable
as strange chars and boxes. because in java message the arabic text is
displaying as boxes.

How can i store that arabic text in java variable in proper form
without appearing as boxes.

Thanx.


I think it is a font issue.
you need to use a font that supports Arabic characters to be able to see
them correctly.
 
S

Sairam

The arabic text is NOT displayed but is saved, properly.

Addding the following html code immediately after <head> could help.

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
 
K

Khan

Problem solved, i was using <charset=windows-1256"> instead of UTF-8.

Thanx 4 reply.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top