When i export my database through PHPMYADMIN the database saved replaces characters like ' with garbage like ’
I need to be able to export my database without corrupting it! I need help any ideas suggestions ANYTHING would be greatly appreciated. I have been trying to resolve this for days, and nobody even people i thought were experts can figure it out!

Comments

Steven’s picture

Drupal stores its data in UTF-8 encoding. Make sure you are viewing it with an editor that supports Unicode.

--
If you have a problem, please search before posting a question.

parvell’s picture

PhpMyAdmin is not the good tool to do this: this is not a PhpMyAdmin bug but simply mysql 4.1 it's a little buggy: my solution is this:
you have to use mysqldump from command line; if you can't use mysqldump for a site it's not a problem, you need at least one machine that can execute mysqldump.
Let's have an example: I want to tranfer my database to the server A to B; in A I can't use mysqldump. No prob. I export my database with phpmyadmin then I upload my database to server B using this time mysqldump with the right charset UTF-8 and it should work. If don't work try to export again from server B database with mysqldump with the right charset UTF-8 and upload again with the same charset. For me worked this way.
(There is a last solution: on server B dump first time with the old encode (latin-1 for example) and redump with utf-8.)

JDSaward’s picture

After trying many suggestions on this site and others regarding this "Microsoft Word Induced Garbage Character Problem" I eventually was able to export a database successfully by using MySQL Administrator. http://www.mysql.com/products/tools/administrator/

The key element was to set "compatibility mode" under advanced options in the backup process. The effect was to create an SQL file without any DEFAULT CHARACTER SET statements. Probably any method that creates such a file would work the same.

I am yet to see if there are side-effects of this method. If anybody can explain more about the why, that would be appreciated.

glass.dimly’s picture

This is simpler than it appears:

mysql -uusername -ppassword --default-character-set=utf8 database < backup.sql

Worked for fixing drupal 4.7 to drupal 5 upgrade that introduced garbage characters.

Tom Ash’s picture

Beautiful! That works for me...