jQuery in Action, 2nd edition*
The moose likes JDBC and the fly likes Need help. Special Characters(�) retrieval from the database using JDBC 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 » Databases » JDBC
Bookmark "Need help. Special Characters(�) retrieval from the database using JDBC" Watch "Need help. Special Characters(�) retrieval from the database using JDBC" New topic
Author

Need help. Special Characters(�) retrieval from the database using JDBC

Raghu Rao
Greenhorn

Joined: Oct 13, 2004
Posts: 1
I am trying to retrieve Trademark(�) character from the database using java. The driver used is a Default DB2 JDBC Driver. When I retrieve registered (�) character, I am able to see it perfectly fine, but when I retrieve trademark (�) character, I get a question mark character (?). Please let me know what I would have to do to pick the trade mark character.

I am creating a connection, creating a statement, calling executeQuery with a stored proc., and then tried calling getString and getBytes, but wasn't successful.

Please let me know if you know how I should retrieve the Trademark(�) character.

Thanks,
Raghu

[ October 13, 2004: Message edited by: Raghu Rao ]

[ October 13, 2004: Message edited by: Raghu Rao ]
[ October 13, 2004: Message edited by: Raghu Rao ]
William A White
Ranch Hand

Joined: Jul 01, 2004
Posts: 35
Originally posted by Raghu Rao:

I am creating a connection, creating a statement, calling executeQuery with a stored proc., and then tried calling getString and getBytes, but wasn't successful.

Please let me know if you know how I should retrieve the Trademark(�) character.


I had a very similar problem with French characters. It turned out that the particular installation of Tomcat/Linux/Java that I was using was not picking up the correct default character encoding - adding the CharSet parameter to the JDBC URL solved my issue - something like your_url_here?CharSet=ISO-8859-1
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Need help. Special Characters(�) retrieval from the database using JDBC
 
Similar Threads
read from tnsnames.ora file
How to add Oracle thin Driver
Inserting Japanese text into Oracle database
JDBC connection in Oracle db
Please help with Websphere