Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Different languages not working - corrupted characters - HELP!

Go to End

2 Posts   807 Views


Community Member, 1 Post

9 February 2010 at 8:20pm

Hi there,

We have a site with pages in several languages including English, French, Indian, Chinese (simplified & traditional), Vietnamese etc.

The site was working fine and for reasons unknown the text is now displaying as invalid characters (i.e. accentuated a's, e's etc.).

If we click around and refresh many times we will see the language displayed properly with correct characters, but this is rare and most of the time it remains broken. Refresh a working page and it's then broken. This is entirely random.

English/latin languages are ok, it's languages with different character sets that are affected.

I searched the forum and found a fix by modifying the connection string in MySQLDatabase.php by adding this code:

$this->query("SET CHARACTER SET 'utf8'");
$this->query("SET NAMES 'utf8'");
$this->query("SET COLLATION_CONNECTION='utf8_general_ci'");

It didn't work. I cleared the cache and it still didn't work.

It mainly affects the main content area (side menu usually displays with correct characters) but sometimes both areas are broken.

I'm sure it's a UTF-8 related thing but can't figure it out. Our host may have recently upgraded their server, not sure if that is relevant.

We are on version 2.3.2-rc4.

Any help would be greatly appreciated!



Community Member, 32 Posts

11 February 2010 at 2:43pm

It is not a server problem