David,
You also need to look at how the parameters are set in the first place. Are you using GET or POST? If you are using GET have you set any of the character encoding settings on the connector?
The following index.jsp works for me: <%@ page contentType="text/html; charset=UTF-8" %> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Character encoding test page</title> </head> <body> <p>Data posted to this form was: <% request.setCharacterEncoding("UTF-8"); out.print(request.getParameter("mydata")); %>
</p> <form method="post" action="index.jsp"> <input type="text" name="mydata"> <input type="submit" value="Submit" /> <input type="reset" value="Reset" /> </form> </body> </html>
David Harland wrote:
Hi Mark
If I have tried the following.
response.setContentType("text/html; charset=utf-8"); PrintWriter out = response.getWriter(); request.setCharacterEncoding("UTF-8"); String test=request.getParameter("login"); out.println("Input string:"+test); out.println(URLEncoder.encode(test,"UTF-8")); out.close();
What is output to the browser is Unicode instead of the characters. If I look at the source of the returned page. I see ฟหกฟหก instead of characters like กรุงเทพฯ.
Regards
David.
--- Mark Thomas <[EMAIL PROTECTED]> wrote:
http://jakarta.apache.org/tomcat/faq/misc.html#tomcat5CharEncoding
Mark
David Harland wrote:
I am using Tomcat 5.0 and I am trying to receive
and
send thai characters. Can someone please tell me
the
simplest ways to do this.
Many thanks
Dave.
__________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam
protection around
http://mail.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail:
[EMAIL PROTECTED]
For additional commands, e-mail:
[EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
__________________________________ Yahoo! Mail Mobile Take Yahoo! Mail with you! Check email on your mobile phone. http://mobile.yahoo.com/learn/mail
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]