I have a web application which uses MySQL database. Earlier I was using the charset ISO-8859-1 on the jsp pages and all characters ( including special characters such as bullets etc) were being displayed properly.
However I had to change the charset encoding on the jsp pages to utf-8 due to some other requirements. Now all special characters from mysql are displayed as junk characters.
I can not go back to ISO-8859-1. Is there way to ensure that the data from mysql database is displayed correctly with UTF-8 charset?
I tried couple of things:
1. used this flag "?useUnicode=true&characterEncoding=utf-8" in the connection string. 2. tried converting the strings to utf-8 : byte bytes = rs.getBytes(1) ; String str2 = new String(bytes, "UTF-8");
However both these approaches are not working.
I would really appreciate any thoughts/helps on this.
Thanks in Advance, Basu. [ August 22, 2005: Message edited by: Basudev Agrawal ]
I do some of my very best work in water. Like this tiny ad: