Drupal supports Unicode (UTF-8) out of the box and so Unicode should be used for all your Drupal installations. Problem is, some things you do with your Drupal installation might result in a database or a table that have non-unicode collation.
Here are a few general tips on making sure everything is using Unicode :
Install manually, don’t use Fantastico
One of the things that Fantastico does is install the database in the wrong collation. Create your database by yourself, make sure that the collation is set right, and then proceed with the Drupal installation.
Verify by running a Unicode change script
Some Drupal modules still have bugs of creating tables with the wrong collation. Here’s a piece of quick code you can run from your shell if you notice mixed collation in your DB. I will go table by table and change the collation to Unicode. If you don’t have shell, try a shell solution for PHP.
Change all tables to Unicode:
for table in
mysql -h<DBserver>-u<DBuser> <DBname> -p<DBpassword> -e "show tables" | grep -v Tables; do mysql -h<DBserver>-u<DBuser> <DBname> -p<DBpassword> -e "alter table $table convert to character set utf8" ; done
Change DB to Unicode :
mysql -h<DBserver> -u<DBuser> -p<DBpassword> alter database <DBname> character set utf8;
- The external links dilemma : How to mark, preview, open-new and AJAX your outgoing links
- Two Drupal installations with a shared userbase
- Drupal SEO : A complete beginners step-by-step video tutorial
- PHP session cookies : A global Drupal login problem fix
- Drupal : When Cron jobs do not complete and Cron jobs tips
- Drupal SEO : The top Drupal SEO modules and how to use them