Well, my blog was windows-1251. Terrible, isn’t it? Almost everyday I talk around that every project on the web should be unicode, but my own blog was not UTF-8 encoded. The problem was the collected cp-1251 content.
Today the conversion has been done. The procedure is very simple:
- Backup your current database
mysqldump --opt -u user --password="pass" dbname > wpdb.sql
- Convert your dump file with iconv
iconv -f WINDOWS-1251 -t UTF-8 wpdb.sql > wp-conv.sql
- Drop your current database and re-create it again. Leave it empty.
- Import converted dump file into new database.
mysql -p dbname < wp-conv.sql
- Set your WordPress (Options – Reading – Encoding) to use UTF-8 enconding