<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="utf-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<form action="index.jsp" >
<input type="text" name="txt">
<input type="submit" name="btn" value="Enter">
</form>
<%if (request.getParameter("txt")!=null) out.print(request.getParameter("txt")); %>
</body>
</html>
When load this page and enter a latin word like Sasan
, then it redisplays Sasan
which is OK.
But when enter a Persian word like ساسان
, then it redisplays Ø³ÙØ§Ù
instead of ساسان
.
How is this caused and how can I solve it?