Hello, I'm experiencing the following difficulty moving my database from latin1 to utf8.
I began developing my first Drupal site (4.6.5) using Mysql 4.1, and knowing nothing about character sets The characters sets in use at that time were:
Client, connection, results, system: utf8
database, server: latin1
Accented characters showed up fine in Drupal, but scrambled in PHPMYADMIN. I now know that this is because I had utf8 data stored in a latin1 database. Instead of leaving well-enough alone (doh!), I wanted everything to show up properly in both Drupal and in PHPMYADMIN. Thinking I had the answer, I decided to move to a utf8 database.
Here's what I did:
1. Created a new (empty) database, with character set utf8.
2. Exported the data definition and data from my working database to a text file. Edited the file to change charset of the table definitions from latin1 to utf8, and changed the encoding of the file itself to be utf8.
3. Did an import to the new (empty) database using the "mysql" command.
Results:
I now have the following Character sets:
Client, connection, results, system, database: utf8
server: latin1
All the tables and columns have default character set utf8. In PHPMYADMIN, all the accented characters are displaying properly. Looks beautiful. So far so good.
The problem is that now when I connect the new database to Drupal, the special characters show up as garbage. It's a terrible mess, because not only to accented characters show up as garbage, it breaks the html and the page itself doesn't render properly.