Character encoding
Character encoding
Hey all!
I just updated my website's CMS from 1.2.5 to 1.8.2, and am having some problems with character encoding. My frontend is in french, and all accents have been converted (and displayed on the website) in the following form:
é becomes é
è becomes è
â becomes â
à becomes Ã
What gives?
EDIT: By the way, they are stored in the SQL database as they are displayed on the website (é, etc.), and utf-8 encoding is selected in the CMS Made Simple admin console.
I just updated my website's CMS from 1.2.5 to 1.8.2, and am having some problems with character encoding. My frontend is in french, and all accents have been converted (and displayed on the website) in the following form:
é becomes é
è becomes è
â becomes â
à becomes Ã
What gives?
EDIT: By the way, they are stored in the SQL database as they are displayed on the website (é, etc.), and utf-8 encoding is selected in the CMS Made Simple admin console.
Last edited by the_obs on Mon Sep 06, 2010 3:46 pm, edited 1 time in total.
Re: Character encoding
You can try to switch $config['set_names'] in config.php but remember that new versions are more close to utf8the_obs wrote: What gives?
Alby
- Charles Butcher
- Forum Members
- Posts: 103
- Joined: Sat Jul 05, 2008 8:25 pm
Re: Character encoding
I had the same issue a couple of upgrades back, and was planning to convert my database to utf-8 following the discussion here:
http://forum.cmsmadesimple.org/index.php/topic,15578.0.html
But with the next release the problem went away
http://forum.cmsmadesimple.org/index.php/topic,15578.0.html
But with the next release the problem went away

Re: Character encoding
Thank you for your responses.
Alby, your solution did it, thank you very much. Although I don't quite understand what the problem was: was it that the text in my DB isn't encoded in UTF-8?
Alby, your solution did it, thank you very much. Although I don't quite understand what the problem was: was it that the text in my DB isn't encoded in UTF-8?
Re: Character encoding
It's not, which is stupid.the_obs wrote: was it that the text in my DB isn't encoded in UTF-8?
Re: [Solved] Character encoding
So it IS encoded in UTF-8?



Re: [Solved] Character encoding
To find out the encoding, open the database in PHPMyAdmin, and look at the encoding listed for tables. That's what you specify on step 6 (?), or config.php.
Re: [Solved] Character encoding
DB can be utf-8 but your communication (phpmysql) can be other (default for mysql is latin1).the_obs wrote: So it IS encoded in UTF-8? ???![]()
For max compatibility is necessary that your DB is utf-8 AND you must communicate with utf-8
set-names config force your communication in utf8 but if you entered your data in non-utf8 when you retrieve your data you see wrong chars
Alby
Last edited by alby on Tue Aug 31, 2010 2:30 pm, edited 1 time in total.
Re: [Solved] Character encoding
I am still getting problems which I think are character encoding-related.
For example, months in various drop down menus in modules are displayed wrong (august in french is "août" and is displayed with the û as a white interoggation mark in a black diamond).
I think this may also be causing the problems I'm having with a module (see thread [url=http://"http://forum.cmsmadesimple.org/index.php/topic,47069.0.html"]here[/url]), where smarty wrongly compiles a GCB into php.
How can I fix this? If the data in my DB isn't encoded in UTF-8, which encoding is it in?
For example, months in various drop down menus in modules are displayed wrong (august in french is "août" and is displayed with the û as a white interoggation mark in a black diamond).
I think this may also be causing the problems I'm having with a module (see thread [url=http://"http://forum.cmsmadesimple.org/index.php/topic,47069.0.html"]here[/url]), where smarty wrongly compiles a GCB into php.
How can I fix this? If the data in my DB isn't encoded in UTF-8, which encoding is it in?
Re: Character encoding
Like I said many times, database is encoded in what phpMyAdmin says, not what any settings say. Open phpMyAdmin and see the encoding listed for tables.
Re: Character encoding
phpmyadmin says:
MySQL charset: UTF-8 Unicode (utf8)
MySQL connection collation: utf8_bin
And then in the actual DB, some tables have utf8-bin collation, but most have latin1_german1_ci collation.
Does this mean my DB isn't (entirely) in UTF8 and should be converted?
I actually just imported the DB from another older install of CMSMS, how come I suddenly have problems?
MySQL charset: UTF-8 Unicode (utf8)
MySQL connection collation: utf8_bin
And then in the actual DB, some tables have utf8-bin collation, but most have latin1_german1_ci collation.
Does this mean my DB isn't (entirely) in UTF8 and should be converted?
I actually just imported the DB from another older install of CMSMS, how come I suddenly have problems?
Re: Character encoding
I have documented this at length.
On step 7 (methink), or in config.php your setting should be
latin1_german1_ci
and not utf anything.
On step 7 (methink), or in config.php your setting should be
latin1_german1_ci
and not utf anything.