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.
is your browser capable and set up to display Unicode? Many browsers won't automatically switch to another character encoding even when the HTTP headers contain a different encoding from the currently active one.
Joined: Jul 22, 2003
If I accept input in one page, and display it in another, everything works fine (if its in Russian or English - doesnt matter)...
Even if I embedd it into my HTML or my SOurceBundles - everything works just fine...
Even when I store it into database, I can acess database with mysqlCC, and I can see the text in Russian/English in my records...
But if I retrieve stuff from database like I showed above, i get a load of crap for Russian, but everything's fine for English....