[Resolved] Ubuntu 10. - Redmine 1.3 to Ubuntu 12 - Redmine 2.2 - Wrong charset ?!!
As Ubuntu 10 is deprecated, i intended to move to another Bitnami VMWare Appliance with a 12 Ubuntu version and 2.2 Redmine.
I've exported my database, imported it in the new server, but all the special characters (french) are not showing up properly.
I already had this problem in the past :
But this time i took care of everything. Unfortunately, it still produces jibberish.
I checked all my system LANG variables, all the collation / characters of Mysql and so on, and compared it with my previous Ubuntu 10 system (still running). Everything is the SAME. Even with phpmyadmin on each server : characters are showing up the same way. So i should expect the webpage to show up properly !
The only thing i can see is that the HTML source is not the same anymore with the new Redmine version.
PREVIOUS REDMINE VERSION :
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
NEW ONE :
<meta charset="utf-8" />
Is there any small changes in the way Redmine uses charsets ?
I'm lost and dunno what to tune in order to have all my characters showing up properly.
RE: Ubuntu 10. - Redmine 1.3 to Ubuntu 12 - Redmine 2.2 - Wrong charset ?!! - Added by Robert Murdock over 9 years ago
Yes !!! I finally get rid of the issue.
For everyone, my problem was that all my french accents were not showing properly in my browser : "Ã©" instead of "é" for example.
In my database (on my old server, were it was running fine), they were also showing as "Ã©" (i saw this with phpmyadmin).
So they weren't decode properly in my new server and i couldn't find the reason.
The solution is to export properly you old database as latin1, removing all charsets declarations, and reimported it as UTF8 in your new server (if you are migrating like me). I think my solution also work to convert your actual database (you don't need to have 2 server).
1) BACKUP DATABASE
/opt/bitnami/mysql/bin/mysqldump -u root -p --opt --quote-names --skip-set-charset --default-character-set=latin1 bitnami_redmine --result-file=bitnami_redmine.sql
2) REIMPORT DATABASE
mysql -u root -p --default-character-set=utf8 bitnami_redmine < bitnami_redmine.sql
Don't forget to declare your BITNAMI_REDMINE database as utf8_general_ci.
After this move, you should end with all your accents showing up properly in the database, and as a result, showing up properly on your webserver too.
I also checked, all new entries are inserted without garbage stuff in the database.
I wish to thanks this guy for the solution : [[http://www.garethsprice.com/blog/2011/fix-mysql-latin1-utf-character-encoding/]]
Thanks everybody for your help.
RE: [Resolved] Ubuntu 10. - Redmine 1.3 to Ubuntu 12 - Redmine 2.2 - Wrong charset ?!! - Added by Etienne Massip over 9 years ago
RE: [Resolved] Ubuntu 10. - Redmine 1.3 to Ubuntu 12 - Redmine 2.2 - Wrong charset ?!! - Added by Vincent Mathon over 9 years ago
-Dfile.encoding=UTF8 solves my problem, thanks.
RE: [Resolved] Ubuntu 10. - Redmine 1.3 to Ubuntu 12 - Redmine 2.2 - Wrong charset ?!! - Added by Anonymous almost 9 years ago
I had exactly the same problem as Robert Murdock but with greek.
I had to migrate the database from redmine 1.2 to 2.3.
Exporting and importing the database as mentioned
above solved my problem.