Jump to:

23487 Posts in 18996 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » Different languages not working - corrupted characters - HELP!

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

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

Page: 1
Go to End
Author Topic: 541 Views
  • tylerdurden
    Community Member
    1 Post

    Different languages not working - corrupted characters - HELP! Link to this post

    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!


  • Solo
    Community Member
    32 Posts

    Re: Different languages not working - corrupted characters - HELP! Link to this post

    It is not a server problem

Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.