[development] phpMyAdmin + Drupal 4.7 issue
steven at acko.net
Tue Mar 28 06:24:33 UTC 2006
We've started using MySQL conditional comments (of the form /*!40100 ...
*/) with some MySQL 4.1+ specific code (to set the right db table
character set). Unfortunately, phpMyAdmin blindly removes all comments
when you upload an SQL file like our database.mysql.
This means that anyone performing a fresh install, using MySQL 4.1+ and
phpMyAdmin will encounter problems with non-ascii characters.
In theory the admin should just specify the character set when creating
the database. But, most hosts will create databases for you AFAIK, or
will do it through a simplified front-end where you can only set the name.
I don't really have a good view on the usage of tools like phpMyAdmin. I
imagine it's pretty widespread though. I found out about this issue
after someone reported Unicode problems today:
So, any ideas on how to address this? Some options:
- Tell phpMyAdmin users to create their db in utf-8 encoding (or have it
created as such by the host). Will need clear and easy to find
- Provide a separate MySQL 4.0 and 4.1+ database.mysql file instead of
one with conditional comments and tell people to use the right one.
I submitted a patch to phpMyAdmin(*) to make them parse these constructs
correctly, but it doesn't help existing users at all.
(*) Yes, I washed my hands afterwards. Their code stinks.
More information about the development