wood burning stoves 2.0*
The moose likes JSP and the fly likes Problem in displaying unicode data from DB2 in JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Problem in displaying unicode data from DB2 in JSP" Watch "Problem in displaying unicode data from DB2 in JSP" New topic
Author

Problem in displaying unicode data from DB2 in JSP

Mina Syal
Ranch Hand

Joined: Jun 24, 2004
Posts: 31
Hi,

I have unicode data in DB2. I am trying to display it in my JSP. I am doing following:
<%
while(rs.next())
{
name = rs.getString(1);
value = new String(name.getBytes("UTF8"));
%>
<TR>
<TD width="345"><%=value%></TD>
</TR>
<%
i++;
}
%>

and i have set the character encoding to UTF-8 in jsp. It dose display japanese characters but not correctly.

I have checked the UTF-8 value which is coming from database is right by putting them in string variable.

Please respond.

Thanks in advance.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Problem in displaying unicode data from DB2 in JSP
 
Similar Threads
Unable to connect to database
Need help selected text fields visible for particular option from drop down list in JSP(struts)
Loop in JSP with Struts
Need to get utf-8 strings in java servlet
error showing while retrieving the data from drop down list