B
bdobby
Hi, I'm back trying to sort out what happens to £ (UK currency symbol)
in a JSP form running on Tomcat 5 under Windows. I have reduced the
problem to a simple example, which I enclose below. If I enter £ in
the textarea and submit the form, the £ gets prefixed with an accented
A. The A also appears in the query string in the browser's address bar
as %C2. However, if I save the source of the displayed JSP as an HTML
file, submitting the form displays only the £ (%A3) in the query
string.
Any help would be GREATLY appreciated.
TIA
Brian
Here is the JSP:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@page contentType="text/html;charset=UTF-8"%>
<%@page pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head><title>JSP Page</title></head>
<body>
<form>
£<br>
<textarea name=text1>
<cut value="${param.text1}"/>
</textarea><br>
<input type=submit name=submit value='submit'/>
</form>
</body>
</html>
Here is the URL displayed after submitting the form:
http://localhost:8084/Test/index.jsp?text1=£&submit=submit
in a JSP form running on Tomcat 5 under Windows. I have reduced the
problem to a simple example, which I enclose below. If I enter £ in
the textarea and submit the form, the £ gets prefixed with an accented
A. The A also appears in the query string in the browser's address bar
as %C2. However, if I save the source of the displayed JSP as an HTML
file, submitting the form displays only the £ (%A3) in the query
string.
Any help would be GREATLY appreciated.
TIA
Brian
Here is the JSP:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@page contentType="text/html;charset=UTF-8"%>
<%@page pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head><title>JSP Page</title></head>
<body>
<form>
£<br>
<textarea name=text1>
<cut value="${param.text1}"/>
</textarea><br>
<input type=submit name=submit value='submit'/>
</form>
</body>
</html>
Here is the URL displayed after submitting the form:
http://localhost:8084/Test/index.jsp?text1=£&submit=submit