S
Steve Rainbird
I have a problem that whenever I enter arabic text in a jsp input field it
gets garbled.
To test this I have written a jsp that just copies text from one box to
another and its garbled in the destination.
Please help me this is driving me mad!!
Any ideas gratefully received.
The jsp is below
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<%@ page contentType="text/html;charset=windows-1256"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1256"/>
<title>AAA</title>
<style type="text/css">
body {
background-color: #ffffff;
}
</style>
</head>
<%
String fromval, toval;
fromval = request.getParameter("FROM");
if(fromval != null && fromval.length() > 0) {
toval = fromval;
} else {
toval = "Default";
}
%>
<body><form name="AAA Sample" action="AAA.jsp" method="post"
enctype="application/x-www-form-urlencoded">
<p>
Sample Form.
</p>
<p>
Arabic text: ÈíÇäÇÊ ÇáÚãíá ÇáÑÆíÓíå
</p>
<p>
</p>
<p>
Copy from here:
<input type="text" name="FROM" maxlength="50" size="50"
value="ÈíÇäÇÊ ÇáÚãíá ÇáÑÆíÓíå"/>
</p>
<p>
</p>
<p>
To here:<input type="text" name="TO" maxlength="50" size="50"
value="<%=toval%>"/>
</p>
<p>
</p>
<p>
<input type="submit" name="Submit"/>
</p>
</form></body>
</html>
gets garbled.
To test this I have written a jsp that just copies text from one box to
another and its garbled in the destination.
Please help me this is driving me mad!!
Any ideas gratefully received.
The jsp is below
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<%@ page contentType="text/html;charset=windows-1256"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1256"/>
<title>AAA</title>
<style type="text/css">
body {
background-color: #ffffff;
}
</style>
</head>
<%
String fromval, toval;
fromval = request.getParameter("FROM");
if(fromval != null && fromval.length() > 0) {
toval = fromval;
} else {
toval = "Default";
}
%>
<body><form name="AAA Sample" action="AAA.jsp" method="post"
enctype="application/x-www-form-urlencoded">
<p>
Sample Form.
</p>
<p>
Arabic text: ÈíÇäÇÊ ÇáÚãíá ÇáÑÆíÓíå
</p>
<p>
</p>
<p>
Copy from here:
<input type="text" name="FROM" maxlength="50" size="50"
value="ÈíÇäÇÊ ÇáÚãíá ÇáÑÆíÓíå"/>
</p>
<p>
</p>
<p>
To here:<input type="text" name="TO" maxlength="50" size="50"
value="<%=toval%>"/>
</p>
<p>
</p>
<p>
<input type="submit" name="Submit"/>
</p>
</form></body>
</html>