I have a simple website having russian content, but its not displaying right in website. I am using even following meta tags

<html lang="ru">
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<meta http-equiv="content-language" content="ru">

But still question marks are there. Please help me regarding this issue

thanks in advance

6 Years
Discussion Span
Last Post by BzzBee

Can you give us some examples of the characters you're trying to display? Try:

<meta http-equiv="content-type" content="text/html; charset=windows-1251" />

Yes i am using this as well. here is my website please check and see its view sourse


These type of characters i am using.

Итак, слева расположены кадры из "Меча

I had tried these characters just at simple html page with nothing else, then it works fine but as i am going at my actual site it convert all the text in question marks, i do not understand why its doing this.


So the windows-1251 didn't work?? Every russian site i've been to has this character encoding! Look here:

"Most Russian-language Web pages (more than 90% for sure) are made nowadays in Windows-1251 encoding a.k.a. "Cyrillic(Windows)", just because the majority of authors work under MS Windows nowadays and 1251 is what Microsoft uses for Cyrillic, so built-in Windows Cyrillic fonts and keyboard tools are for Windows-1251 encoding."


thanks for the help nonshatter

I have read all these kind of stuff. and it works fine if i use plain html page with just text. But when i use .php file and including different files in main file and my data is coming from database then it all goes wrong. :(


When I view your site, I see two different content-type meta tags:

  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  <title>Морайра Инвест - недвижимость в испании - Buy, Sell, Resa</title>
  <meta http-equiv="content-type" content="text/html;charset=utf-8">
  <meta http-equiv="content-language" content="ru">

You should only have 1 and you probably want to be using UTF-8 as this should contain the character sets you want to be working with.

The first covers a great overview of the implications of characters sets in php and the second has a very detailed breakdown of many string functions and their risk level in terms of UTF-8 corruption.

This boils down to your outputted html needs to have a proper content-type meta tag and your application needs to send a proper content-type header and they should match.

Beyond what the articles mentions, your database connection needs to be set to the proper character set.
-MySQL Extension

-MySQLi Extension

-PDO Extension

Within your database you also need to set the proper character set and collation
Your tables will also have similar settings.

Hopefully this helps and gets you pointed in the right direction. Iñtërnâtiônàlizætiøn in php can be a real pain.


Thanks for the help. But now i had resolved the issue by using hexadecimal codes. I tired every option but that was not working accurately thats why now i am using hexadecimal characters for russian text.

This question has already been answered. 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.