Hey!
I�m trying to make it so that my clients could use different languages when entering stuff into my froms. What I am doing right now is:
All my pages have <%@ page language="java" contentType="text/html; charset=UTF-8" at the top
When I retrieve parameters I use the following procedure:
String text = request.getParameter("text");
text = new String(text.getBytes("8859_1"),"UTF8");
This seems to work perfectly for throwing parameters from page to page. Also, it seems to work fine to ENTER stuff into MySQL (I look at mysql through GUI client, and I can see all my Unicode stuff correctly).
However, what is troubling me, is that when I retrieve that Unicode stuff from DB and try to display it, I get a whole bunch of junk on my page. Here�s how I retrieve it:
And in my JSP page I simply display name and message from the list returned by this function�
Does anyone know how to make my JSP page display my stuff correctly? I also tried doing:
<%= new String(message.getBytes("8859_1"),"UTF8") %>
But that just gives me a whole bunch of boxes instead of text.
Any help is greatly appreciated.
I�m trying to make it so that my clients could use different languages when entering stuff into my froms. What I am doing right now is:
All my pages have <%@ page language="java" contentType="text/html; charset=UTF-8" at the top
When I retrieve parameters I use the following procedure:
String text = request.getParameter("text");
text = new String(text.getBytes("8859_1"),"UTF8");
This seems to work perfectly for throwing parameters from page to page. Also, it seems to work fine to ENTER stuff into MySQL (I look at mysql through GUI client, and I can see all my Unicode stuff correctly).
However, what is troubling me, is that when I retrieve that Unicode stuff from DB and try to display it, I get a whole bunch of junk on my page. Here�s how I retrieve it:
And in my JSP page I simply display name and message from the list returned by this function�
Does anyone know how to make my JSP page display my stuff correctly? I also tried doing:
<%= new String(message.getBytes("8859_1"),"UTF8") %>
But that just gives me a whole bunch of boxes instead of text.
Any help is greatly appreciated.