Website content in serbian language

Permalink
Hi, guys, I'm struggling with the following:
I need content for a website to be in serbian.
I have 2 pages onehttp://globalbrands.rs/sr/ andhttp://globalbrands.rs/en/.
As one would guess en for english and sr for serbian.
When I insert content in serbian only shows ???? al over the place.
How can I enable encoding support for this language?
Many thanks in advance.

PauloCarvalhoDesign
 
Brainakazariua replied on at Permalink Reply
Brainakazariua
Sounds to me like your database is not created to support UTF8. Assuming that the name of your database is "concrete", it should have been created with this command.

mysql> create database concrete default character set utf8 default collate utf8_unicode_ci;

to change it at this point run this command on the database:
ALTER DATABASE `concrete` DEFAULT CHARACTER utf8 COLLATE utf8_unicode_ci;


In php.ini, you should set the following variables.

default_charset = "UTF-8"
mbstring.internal_encoding = UTF-8

If you own the server or have full control over mysql, you can add the following lines to /etc/mysql/my.cnf under the appropriate sections to force all connections to all databases to be UTF8.

[client]
default-character-set=utf8

[mysqld]
init_connect='SET collation_connection = utf8_unicode_ci; SET NAMES utf8;'
default-character-set=utf8
character-set-server=utf8
collation-server=utf8_unicode_ci
skip-character-set-client-handshake

[mysqldump]
default-character-set=utf8

[mysql]
default-character-set=utf8