I am creating a simple login page and I want to pass login and password parameters as UTF-8 encoded strings. As you can see in the code below, the first line is where I set encoding to UTF-8, but it seems this is pointless because it doesn't work. When I use login and password parameters with accents the result page receives strange characters.
How to set character encoding correctly in a way that works in all browsers?
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>My Page</title>
</head>
<body>
<h1>Welcome to My Page</h1>
<form name="login" action="login.jsp" method="POST">
Login:<br/>
<input type="text" name="login" value="" /><br/>
Password:<br/>
<input type="password" name="password" value="" /><br/>
<br/>
<input type="submit" value="Login" /><br/>
</form>
</body>
</html>