This week's book giveaway is in the OCAJP forum.
We're giving away four copies of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) and have Khalid A Mughal & Rolf W Rasmussen on-line!
See this thread for details.
Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to insert japanese data from a jsp to DB2

 
Nitin Jengte
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I want to insert japanese data from jsp. In the jsp I have one field and I am copying a japanese text in it and then posting this request to DB2.
When I am trying to retrieve this data in another jsp, I am getting junk(???).
Pl. help me to solve this problem.
Thanks in advance
Regards
Nitin
 
sachin kotgire
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try this code in your JSP
<%
String s1 = request.getParameter("param");
s1 = new String(s1.getBytes("ISO-8859-1"), "UTF-8");
%>
the string s1 will have your japanese character data. You can use this string to insert into the database.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic