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

character set


Go to End


12 Posts   2886 Views

Avatar
Solo

Community Member, 32 Posts

2 February 2010 at 7:38pm

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
bummzack

Community Member, 904 Posts

2 February 2010 at 8:37pm

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

Community Member, 32 Posts

3 February 2010 at 1:30pm

Edited: 03/02/2010 6:26pm

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
bummzack

Community Member, 904 Posts

3 February 2010 at 8:27pm

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

Community Member, 32 Posts

3 February 2010 at 8:40pm

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

Avatar
Solo

Community Member, 32 Posts

3 February 2010 at 8:51pm

Maybe some Russian members can help me?

Avatar
carlos

Community Member, 42 Posts

5 February 2010 at 3:27pm

Hi Solo

give this a try an let me know

add it in mysite > _config.php

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

cheers

Avatar
Solo

Community Member, 32 Posts

5 February 2010 at 3:52pm

Edited: 06/02/2010 5:03pm

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