Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By rlbravo on
Hi there!
I´m trying to install 4.7 with mysql 4.0. I´ve been reading lot´s of posts about the utf-8 topic and still not sure if theres any solution. Right now drupal is working but the database tables are corrupted. Some spanish characters are stored as Á°, Á% but displayed correctly throw drupal.
¿Is there any procedure for making Drupal work saving the characters correctly in mysql 4.0?
Thanks
rlbravo
Comments
You may want to attach the
You may want to attach the BINARY attribute to all the varchar fields. Also, change all TEXT to BLOB.
But... those spanish characters occupy 2 bytes. So, for example, if you have a 20 bytes-wide field in your database, it can only store 10 spanish characters. And if there's some ASCII there too (spaces, commas), some chars will be choped! In other words, a huge headache.
Nothing wrong
MySQL 4.0 does not support UTF-8, but the characters are stored just fine as a byte-stream masquerading as Latin-1. You only need to pay attention when upgrading to MySQL 4.1, to export as Latin-1 from 4.0, then import as UTF-8 into 4.1.
--
If you have a problem, please search before posting a question.
thanks!
Great solution!
Thanks for your help!
rlbravo
how to export properly
I'm having exactly this problem in moving my database to a backup site running 4.1 from a live site running 4.0. Is there a flag for mysqldump i need to include? Something I need to do when importing via mysql?
Right now, some special characters get whacked when I try this, and I'd really appreciate help from someone who's gotten this to work. Thanks!
---
Work: BioRAFT
correct commands?
Ok, the below seems to work for me to move from 4.0 to 4.1 and doesn't mangle special characters as far as I can see.
to backup:
mysqldump -uusername -ppassword --add-drop-table --default-character-set=latin1 database > backup.sql
when restoring from the command line:
mysql -uusername -ppassword --default-character-set=utf8 database < backup.sql
---
Work: BioRAFT
Upgrade 4.6 MySQL DBs with UTF8 data to 4.7 - this worked!
Follow this tip: http://drupal.org/node/84214
After a long search, it's the only thing which worked for me.
Amnon
-
Drupal Focused Search Engine | Drupal Israel | Organic Web Strategy Consulting
Fix
mysql -uusername -ppassword --default-character-set=utf8 database < backup.sql
Worked for fixing drupal 4.7 to drupal 5 upgrade that introduced garbage characters.