List:MySQL and Java« Previous MessageNext Message »
From:Timothy Tye Date:January 9 2003 3:31pm
Subject:RE: Can't store Euro sign with JDBC
View as plain text  
Most likely, this is a Unicode translation problem.
The JDBC driver is given Unicode strings to store on the database.
The Euro is U20A0 and must be translated to a single byte code point for storing in you
MYSQL database.
When writing the Euro from Windows (codepage 1252) it is code point 0x80.  The Windows
choice of code point for the Euro does NOT correspond to the ISO code point for Euro.  
Also, ISO 8859-1 does NOT define a code point for Euro at all.
ISO 8859-15 does define the Euro and should replace ISO-8859-1 in all European
applications.
BTW ISO-8859-15 defines the Euro as code point 0xA4.
Tim

-----Original Message-----
From: Davide Villa [mailto:DavideV@stripped]
Sent: Wednesday, January 08, 2003 2:01 PM
To: java@stripped
Subject: Can't store Euro sign with JDBC


When I try to store a string containing the Euro symbol (€) mysql stores
another char (¬) instead of the Euro sign.
I work on a Win2k box with mysql version 3.23.53 and Connector/J jdbc driver
version 2.0.14.
If I try to store the same string using the C API it works fine and I am
able to read the correct string in Java too.
It seems to be a conversion problem only in the update or insert operation
but not in the select.
Any idea?

Thanks
Davide


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/doc/         (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <java-thread4873@stripped>
To unsubscribe, e-mail <java-unsubscribe-TIMOTHY.TYE=ca.com@stripped>

Thread
Can't store Euro sign with JDBCDavide Villa8 Jan
RE: Can't store Euro sign with JDBCTimothy Tye9 Jan