Jump to:

23371 Posts in 18161 Topics by 2865 members

General Questions

SilverStripe Forums » General Questions » character set

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 2
Go to End
Author Topic: 1884 Views
  • Solo
    Avatar
    Community Member
    32 Posts

    character set Link to this post

    Ok I'm from Russian, and my site have different from English language, i have a problem with character set in my database, it is utf-8, and Russian simbols looks not for they must:Новый. In CMS and in the site it looks well, but i think it may case problems in future. How i can solve this problem?

  • banal
    Avatar
    Community Member
    901 Posts

    Re: character set Link to this post

    Don't worry. This is most likely a problem of the client you're using to connect to the MySQL DB.
    UTF-8 encodes all characters outside the ASCII set with 2 bytes instead of one byte, so the data you see is correct, just not correctly interpreted as UTF-8 by your client software. What are you using to browse the MySQL Data? PhpMyAdmin?

  • Solo
    Avatar
    Community Member
    32 Posts

    Re: character set Link to this post

    Yes it case in phpMyAdmin, and when sapphire replays an error. I have modx, wordpress, and more cms and they haven't this problem, there database in phpMyAdmin is ok, so why this happens only with SS?

  • banal
    Avatar
    Community Member
    901 Posts

    Re: character set Link to this post

    Maybe SilverStripe doesn't set the encoding of the table correctly and assumes UTF-8 to be default? Honestly, I don't know. Did you try playing with the encoding settings in PhpMyAdmin?
    Maybe a core dev could shed some light on this?

  • Solo
    Avatar
    Community Member
    32 Posts

    Re: character set Link to this post

    No i did nothing. I even reinstall cms and the database. The problem is only with Russian letters, English displays correctly.

  • Solo
    Avatar
    Community Member
    32 Posts

    Re: character set Link to this post

    Maybe some Russian members can help me?

  • carlos
    Avatar
    Community Member
    41 Posts

    Re: character set Link to this post

    Hi Solo

    give this a try an let me know

    add it in mysite > _config.php

    $databaseConfig["type"] = 'MySQLUnicodeDatabase';

    cheers

  • Solo
    Avatar
    Community Member
    32 Posts

    Re: character set Link to this post

    When i try to put this:

    $databaseConfig["type"] = 'MySQLUnicodeDatabase';

    in my _config.php,
    i get this error:

    Fatal error: Class 'MySQLUnicodeDatabase' not found in G:\MySites\MySite\sapphire\core\model\DB.php on line 79.


    I'll try to use another from phpMyAdmin client - dbForge Studio for MySQL, so wrong letters displays there too.
    When i install blog module i have ���� in tagCloud.

    1884 Views
Page: 1 2
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.