File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Special character handling in DB2 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Special character handling in DB2" Watch "Special character handling in DB2" New topic
Author

Special character handling in DB2

Jagdeep Sharma
Ranch Hand

Joined: May 24, 2010
Posts: 121

Hi all,

I am submitting special character from form to servlet and storing it into database. I am using UTF-8 across the all application (JSP, Servlet and DB2). Everything is working fine but in database this symbol is taking 3 character instead of 1. My database table column type is varchar. My question is that is everything alright here and why this is happening.
Phani Raju
Greenhorn

Joined: Aug 03, 2007
Posts: 19
Have you verified what charset your database is setup with?
Jagdeep Sharma
Ranch Hand

Joined: May 24, 2010
Posts: 121

Phani Raju wrote:Have you verified what charset your database is setup with?


Yeah as i mentioned above everything is in UTF-8.
Jagdeep Sharma
Ranch Hand

Joined: May 24, 2010
Posts: 121

Jagdeep Sharma wrote:
Phani Raju wrote:Have you verified what charset your database is setup with?


Yeah as i mentioned above everything is in UTF-8.




I mean on JSP i use UTF-8 (in page directive)
servlet - req.setCharacterEncoding("UTF-8")
database has UTF-8 charset.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Special character handling in DB2