Re: Moving from MySQL4.0 to MySQL5: problems with Greek Characters
Hi!
I have had the same issue recently when migrating from 4.0 to 4.1! What's more I had to do it not only with greek encodings but also with utf8. I will try to remember how I did it.
Firstly, I think that in 4.1 it is the first version of MySQL where character encodings get their actual meaning. This means that if you create a table and you want it to actually have greek encoded characters you must add "DEFAULT CHARACTER SET greek" at the end of the CREATE statement.
So, do your mysqldump from the MySQL 4.0 server but add the parameter --default-character-set=greek there. This way the dump should be aware that the data it dumps is actually greek although your tables are latin1. Then in the generated .sql file you should manually add "DEFAULT CHARACTER SET greek" to the CREATE statements of the database and the tables.
This has worked for me for greek and utf8 encoding! If it doesn't work try adding --skip-set-charset as a parameter to mysqldump! I did it some time ago and I don't remember if you must put this parameter or not, sorry...
Also I must mention that I use Java and JDBC if that's of any help as to how I retrieve and insert data to the database. My advice is from 4.1 and on always explicitly add "DEFAULT CHARACTER SET xxx" to the CREATE statements unless there is a real reason for not doing so. If your characters are greek then say so. Don't use latin1 and then decode them back to greek (at least that's what I had to do before 4.1).
Good luck...
Takis K. Bouyouris
Software Engineer
Subject
Views
Written By
Posted
5068
March 13, 2006 12:13PM
Re: Moving from MySQL4.0 to MySQL5: problems with Greek Characters
2511
March 17, 2006 04:56AM
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.