Convert MySQL Table from Latin1 to UTF8
Last week I upgraded my blog from wordpress 2.1 to 2.2. Because the new version of wordpress uses UTF8 charset, while the older version uses Latin1, all the Chinese characters turns to question marks. I use this script to fix it:
#!/bin/bash
tables=`mysql -u WORDPRESS_DATABASE_USER_NAME -pPassword WORDPRESS_DATABASE_NAME \
-e “show tables” | grep wp_`
for table in $tables;
do
echo “processing [...]


Recent Comments