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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem storing Extended characters in mysql

Status
Not open for further replies.

JagBains

Programmer
Jun 4, 2003
1
GB
Hi,

I am having problems storing charater greater than 0x7F in the database. For example if what to store the following : Jersey’s ( which i cut from a HTML page, html code is Jersey & # 146 ;s) it comes back as Jersey?s.
Just before I save the data to the database, I have the following:

About to store JerseyÆs
Data length:8
Hex 0: 4a 65 72 73 65 79 92 73

When I retrieve it from the database, I have the following given back:
Jersey?s
Data length:8
Hex 0: 4a 65 72 73 65 79 3f 73

I am using Mysql 3.23.51-max in a J2EE environment.
I have tried using both org.gjt.mm.mysql.Driver and com.mysql.jdbc.driver drivers in mysql-connector-java-3.0.6-stable-bin.jar file.

My connection string is as follows:
jdbc:mysql://localhost:3306/cms?characterEncoding=UTF8

Please help!!!
Thanks
Jag
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top