Move data from mysql 4.0 to 5.6 without corrupting encoding
Here is how I did it. First, I launched old mysqld and issued this command:

mysqldump -u root -p --tab=tmp --default-character-set=latin1 database tablename

Then, I started new mysqld and created table structure using phpmyadmin. I selected latin5_turkish_ci as collation for database and table rows.

I also copied resulting tablename.txt to new mysql data directory. And I imported the file like this:

mysqlimport -u root -p --default-chracter-set=latin5 database tablename.txt

This fixed issues I was having.