Hi I'm using the 2 pieces of code typed below to set the character set to utf8 (so that I can output russian characters on page, and then to output it on web pages. I have tried to set the character set to utf8 so that russian characters appear properly but I still see russian characters as ?????.

First piece of code that i have used to set the character set to utf8 so that russian language characters appear properly on page.

if (function_exists('mysql_set_charset') === false) {
function mysql_set_charset('utf8', $link = null)
if ($link == null) {
return mysql_query('SET CHARACTER SET utf8');
} else {
return mysql_query('SET CHARACTER SET utf8', $link);

and this is how I have used the function above in my coding. $lang_cat_title_table=mysql_set_charset('utf8') Is there something wrong in this code..??

If you know any other way to retrieve russian character from database please share your trick,that would be helpful,Thanks

9 Years
Discussion Span
Last Post by martin5211

Revise your mysql database properties is set to utf8 and utf8_bin collation, then take a look at the table structure if it is utf8 and utf8_general_ci collation is selected too.

Finally, inside the html layout, the meta 'content-type' must be stand as utf-8 charset to handle these characters.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.