I've converted a latin1 database I have to utf8. The process has been:
# mysqldump -u root -p --default-character-set=latin1 -c --insert-ignore
--skip-set-charset mydb mydb.sql
# iconv -f ISO-8859-1 -t UTF-8 mydb.sql mydb_utf8.sql
[then i replaced all CHARSET=latin1 to CHARSET=utf8 in the file, and
checked in the editor that non default characters as accents were viewed
correctly using UTF8 charset]
mysqlCREATE DATABASE mydb_utf8 CHARACTER SET utf8 COLLATE utf8_general_ci ;
# mysql -u root -p --default-character-set=utf8 mydb_utf8 < mydb_utf8.sql
I made a simple script in PHP to dump data from tables which had non
standard characters. But the resulting page is viewed correctly in
iso-8859-1 encoding and not in UTF-8.
At this moment i'm clueless were the problem lies.
..alex
# mysqldump -u root -p --default-character-set=latin1 -c --insert-ignore
--skip-set-charset mydb mydb.sql
# iconv -f ISO-8859-1 -t UTF-8 mydb.sql mydb_utf8.sql
[then i replaced all CHARSET=latin1 to CHARSET=utf8 in the file, and
checked in the editor that non default characters as accents were viewed
correctly using UTF8 charset]
mysqlCREATE DATABASE mydb_utf8 CHARACTER SET utf8 COLLATE utf8_general_ci ;
# mysql -u root -p --default-character-set=utf8 mydb_utf8 < mydb_utf8.sql
I made a simple script in PHP to dump data from tables which had non
standard characters. But the resulting page is viewed correctly in
iso-8859-1 encoding and not in UTF-8.
At this moment i'm clueless were the problem lies.
..alex
Comment