Transferring data from MSSQL to UTF-8 encoded MySQL database
Posted by: Takis Bouyouris
Date: March 05, 2006 12:09PM

Hello all! I have been trying to transfer data from a table in MSSQL to an identical table in MySQL (MySQL 4.1). I am a Java developer and I use JDBC (mysql-connector 3.1.11). The thing is that the the table in MSSQL are encoded in MSSQL's default encoding which is iso-8859-1 - I think -, but the the MySQL table is UTF-8 encoded! I managed to do the transfer right only by converting the encoding in this way: CONVERT(_latin5? USING utf8).

I used _latin1 of course at first but only some of the characters (greek characters) were transferred correctly. I experimented and found out that by using _latin5 all the data were transferred OK! By that, I mean that I can retrieve them from MysQL from a JSP or a Servlet and output them to HTML and see the actual greek characters that I expect to see.

I do have utf8 in all parameters of my MySQL server instance and also in the JDBC query string. If anybody knows the reason for this behaviour I would be glad to hear it.

PS: I have made the exact same post in the MSSQL forum but on second thoughts (and no replies) maybe this is a better place for this problem.

Options: ReplyQuote


Subject
Views
Written By
Posted
Transferring data from MSSQL to UTF-8 encoded MySQL database
4109
March 05, 2006 12:09PM


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.