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.

General Questions

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

character set


Go to End
Reply

12 Posts   1979 Views

Avatar
Solo

2 February 2010 at 7:38pm Community Member, 32 Posts

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?

Avatar
banal

2 February 2010 at 8:37pm Community Member, 901 Posts

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?

Avatar
Solo

3 February 2010 at 1:30pm (Last edited: 3 February 2010 6:26pm), Community Member, 32 Posts

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?

Avatar
banal

3 February 2010 at 8:27pm Community Member, 901 Posts

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?

Avatar
Solo

3 February 2010 at 8:40pm Community Member, 32 Posts

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

Avatar
Solo

3 February 2010 at 8:51pm Community Member, 32 Posts

Maybe some Russian members can help me?

Avatar
carlos

5 February 2010 at 3:27pm Community Member, 41 Posts

Hi Solo

give this a try an let me know

add it in mysite > _config.php

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

cheers

Avatar
Solo

5 February 2010 at 3:52pm (Last edited: 6 February 2010 5:03pm), Community Member, 32 Posts

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.

Go to Top