Transfer data from UTF-8 encoded MySQL database to ISO-8859-7
Posted by: Takis Bouyouris
Date: March 07, 2006 06:01AM

Hello everyone!

I have a problem when trying to copy - transfer more accurately - data from a UTF-8 encoded MySQL database to a ISO-8859-7 (that's for greek) encoded MySQL database. So I have two databases: one with utf8 character set and utf8_general_ci collation and one with greek character set and greek_general_ci collation. I want to transfer whole tables from the first to the second. My MySQL server has default characer-like parameters set to utf8.

Is there something I am missing as to what the proper procedure is? I use useUnicode=true&characterEncoding=utf8 for the connection string of the first database and useUnicode=true&characterEncoding=greek for the second one. Shouldn't that be enough to transfer the data correctly? When I do the transfer (with Java, JDBC) I get ??? in the target database.

I have the feeling that my problem is quite elementary, but it has baffled me quite a bit? I have resorted in experimenting with the CONVERT(...) function in the SELECT and INSERT statements but to no avail. I also tried to do stuff like new String(oldString.getBytes(oldEncoding), newEncoding) in Java but I get the same ??? in the target database.

If anybody knows what I'm doing wrong...
Thanx in advance.., cheers!

Options: ReplyQuote


Subject
Views
Written By
Posted
Transfer data from UTF-8 encoded MySQL database to ISO-8859-7
5595
March 07, 2006 06:01AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.