if the database doesn't store it correctly it can't send it back correctly either. Possibly your JDBC driver (or the way you use it) can't handle Unicode and instead tries to save it all as single character ASCII thus causing the garbled data you're seeing. Check what SQL datatype is expected. It may be that setString() from PreparedStatement doesn't work for you and you need setObject() instead.
Joined: Jan 02, 2004
is there any source where I can know more about tewaking the JDBC to work with Unicode. also, how can i be sure its the jdbc thats the culprit. do you suggest any tests for this.
Welcome to the Ranch "saisuresh "! You'll find this forum a great place to seek help on JSP pages, and there aren't many rules you'll have to worry about, but one is that proper names are required. Please take a look at the JavaRanch Naming Policy and change your display name to match it. In particular, your display name must be a first and a last name separated by a space character, and must not be obviously fictitious. Thanks! bear JSP Forum Bartender P.S. Since this topic is primarily DB-oriented, I'm moving this topic to the JDBC forum.
I have heard about--but have not yet experienced first hand--a problem with PostgreSQL JDBC drivers and unicode. The workaround, I believe, was to call getBytes() instead of getString() when processing your resultSet. Do a search on getBytes() in the PostgreSQL search page. Maybe you will find this thread.
subject: problem with unicode database web application