Converting latin1 to utf8
I have a problem at converting latin1 to utf8.
Mysql version is 5.0.67 and my box is centos 5.5.
At upgrading mysql 4.x to 5.0.67, I copied mysql data directory, and the web page readable with the under-mentioned my.cnf and web page's charset.
And my.cnf is here:
[client]
port = 3306
socket = /opt/lampp/var/mysql/mysql.sock
default-character-set = utf8
[mysqld]
default-character-set = utf8
port = 3306
socket = /opt/lampp/var/mysql/mysql.sock
skip-locking
key_buffer = 16M
max_allowed_packet = 256M
table_cache = 64
sort_buffer_size = 512K
net_buffer_length = 8K
read_buffer_size = 256K
read_rnd_buffer_size = 512K
myisam_sort_buffer_size = 64M
plugin_dir = /opt/lampp/lib/mysql/plugin/
server-id = 1
innodb_data_home_dir = /opt/lampp/var/mysql/
innodb_data_file_path = ibdata1:10M:autoextend
innodb_log_group_home_dir = /opt/lampp/var/mysql/
innodb_buffer_pool_size = 16M
innodb_additional_mem_pool_size = 2M
innodb_log_file_size = 5M
innodb_log_buffer_size = 8M
innodb_flush_log_at_trx_commit = 1
innodb_lock_wait_timeout = 50
[mysqldump]
quick
max_allowed_packet = 32M
default-character-set=utf8
[mysql]
no-auto-rehash
default-character-set=utf8
[isamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M
[myisamchk]
key_buffer = 20M
sort_buffer_size = 20M
read_buffer = 2M
write_buffer = 2M
[mysqlhotcopy]
interactive-timeout
And my CMS's charset setting is "euc-kr".
For converting data, I backed up data with this command.
mysqldump -uroot -p --default-character-set=latin1 -c \ --insert-ignore --skip-set-charset -r dump.sql org_db
Command 'iconv -f ISO8859-1 -t UTF8 dump.sql > dump_utf8.sql" made a sql file with no error, but the Korean letters of this sql could not readable.
And I tried to convert "dump.sql" with these commands and results.
[root@localhost dmupgrade]# iconv -f CP939 -t UTF8 dump.sql > dump_utf8.sql
iconv: 440 an invalid input sequence
[root@localhost dmupgrade]# iconv -f CP949 -t UTF8 dump.sql > dump_utf8.sql
iconv: 74767 an invalid input sequence
At ultraedit, I can read this sql file as Korean letters sellecting cp949, but after saving file as utf8 the problem came at phpmyadmin's importing.
Any comment would be appreciated.