Search code examples
phpmysqlcharacter-encodingspecial-characters

Reading signs like č ć đ š ž from MySql database


I have problems reading signs 'č', 'ć', 'đ', 'š', 'ž' from MySQL database.

I have tried few suggestions that I found on the internet, but none worked. I am looking for correct combination of charset in the database and in PHP file. So far I have always used UTF.


Solution

  • Use SET CHARACTER SET 'utf8' before querying any data.

    http://dev.mysql.com/doc/refman/5.0/en/charset-connection.html