1

I move a Drupal site and DB from old server to new (almost same setting) the site on the new server is running "almost" perfectly, but for the accent caracter encoding... here is the problem.

The site is requesting the file "Québec.jpg" i know for sure I spy it with firebug, and the Québec.jpg is where it should. The only problem is the the photo is not showing properly

If I change the file name for : Québec.jpg it work...

I prefer not thinking about all the change i should do, so now the question why it's doing that, and what to change to fix that, file is there, request it ok, but mix-and-match don't append !

Thanks in advance

  • I think i have found the concep problem here : weblogism.com/item/270/why-does-e-become-a but it's nowhere to get me a solution. NIce to read anyway. in simple : The problem is caused when UTF-8 “é” is literally interpreted as latin-1, that is 11000011 10101001 is read as the two 1-byte latin-1 characters é, rather than the 2-byte UTF-8 character é – menardmam Aug 11 '12 at 1:28
1

The contents of your tables are not stored in the encoding that is specified for those columns. So you need to find out how the characters are stored and what the specified encoding is, e.g. using phpMyAdmin. It seems the characters are stored in UTF-8, but the columns are identified as latin1. If I recall correctly I've used this conversion script successfully in the past for a similar situation. Of course, always backup your database before attempting such operations! Or try it on a copy first.

You can also drop all tables and fully reimport the old database, this time choosing the correct character encoding. (It's best to have everything in UTF-8, so if the old database dump is not in UTF-8, you could convert the .sql file first and then import it as UTF-8).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.