Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

charset collate problem in Java program using java.sql

Status
Not open for further replies.

kknight2046

Programmer
Jul 6, 2006
17
US
I defined one field in one table with a special charset collate setting:
`name` text character set ascii collate ascii_bin NOT NULL

I wrote a Java program use java.sql to retrieve data from the 'name' field.

But the statement:
name = rs.getString("name");
returned some garbage like "[Gasfaf", though the expected return result should be something like "Jen".

How can I solve this problem?

Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top