I've built a multi-lingual site using Drupal 4.7.2 and I am using the contributed modules i18n, inline and tinymce.

It was all working beautifully on my Mac ibook until I tried to move it to the hosting server.

Now Latvian and Russian fonts are not displaying correctly - all non-English letters are replaced with question marks.

I've searched various posts for a solution, but haven't found one yet. Here is what I did:

Before creating the mysqldump I executed the following command:

mysql> ALTER DATABASE dBname CHARACTER SET utf8 COLLATE utf8_general_ci;

Then I created the mysqldump including the following options:

mysqldump -u root -p --compatible=mysql40 --default-character-set=utf8 --quote-names dBname > dBname.sql

(In the above code dBname is the name of my database.)

The hosting server is running MySQL 4.1.18 and phpMyAdmin 2.6.4. with charset utf8 and connection collation utf8_general_ci.

My iBook where I created the site is running MySQL 5.

Using the host phpMyAdmin I imported the sql file and poof! my Russian and Latvian fonts mutated to question marks.

Can anyone explain what I did wrong?

Comments

soupp’s picture

Solutions worked for me in the same situation:

1. Dumping db with terminal on localhost and uploading with terminal as well.
2. Dumping db with phpmyadmin on localhost and uploading with phpmyadmin as well.
3. You may use CocoaMySQL (http://sourceforge.net/projects/cocoamysql/) to do the same. Always worked.

Then. You do not need to add --compatible=mysql40 option at 5.0.x to make a dump for 4.1.x and you dont need to add any CHARACTER SET options as well.

Plain mysqldump -u root -p dBname > dBname.sql should work fine. It worked for me fine. Hope it will help you too.

Drupal Top Sites | Drupal Sites Directory

lisa’s picture

Can you clarify a few things?

1. If I use CocoaMySQL to create the dump do I also need to use it to upload sql file to the server? If so, I don't think that is an option as the host is using phpMyAdmin not CocoaMySQL.

2. Did this part of your post apply only if using CocoaMySQL or is it also applicable if I am using Term or phpMyAdmin to make the dump and upload?

Then. You do not need to add --compatible=mysql40 option at 5.0.x to make a dump for 4.1.x and you dont need to add any CHARACTER SET options as well.

Thanks for your help!

soupp’s picture

1. CocoaMySQL is a Mac programm. You don't need it to be installed at your host. But you can connect to your host mysql server with it (as you do with terminal).

2. Exactly the option --compatible=mysql40 may break your charset. So I wouldn't reccomend to use with any choise. And charset should be transfered from 4.1 to 5.0 fine.

But... just from yesterday's experience: some hosts have a very odd codepage settings for apache which may break thins as well. If you can post a link to your site (or drop me a message) I could check and guess what's going wrong.

Drupal Top Sites | Drupal Sites Directory

lisa’s picture

Thanks soupp!

I got my Russian and Latvian fonts back. :)

I was unable to access my server using CocoaMySQL or Terminal - I don't have those privileges from the host I guess. I have to access it using phpMyAdmin. After some trial and error, I managed to install phpMyAdmin on my ibook. Then I used phpMyAdmin to create the mysqldump and also to import the dump file onto the server. And my lovely fonts are back.

Thanks so much for your help. I really appreciate it.