-
Мужской when i use this in my jsp page it show the correct russian character but when i use the same in javascript alertbox like this alert("Мужской"); its doesnt show the exact russian character instead it show the same "Мужской" can i get solution to show the characters in alert box. Thanks....
-
Did you include UTF-8 in the JSP?
-
Hi ramnath,
Below is my code sample for the previous stated problem of displaying russian character in alert box.And u suggested the charset utf-8.So now can u check wat else to be included? with this code still iam getting the same html code in alert box.. any advice mr.ramnath.. please
test.jsp
********
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<%
String input = "Стандарт";
%>
<%=input%>
<html>
<script type="text/javascript">
function showChar(){
alert("<%=input%>");
}
</script>
<body onload="showChar()">
</body>
</html>
-
Add following line to your JSP.
<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
& make sure this is the first line of your JSP.