I am writing a blog on video lessons from Popov, I went to the output of comments on the notes. All written as shown. But I do not see the Russian font when sending comments. When instead of Russian either questions or another beleberd, I can understand this. You put the encoding everywhere the same and everything works. And then nothing at all, not in the database is not displayed on the page. Date is displayed correctly.

Comment added (s): here is the name of the author
Date: 2013-01-16
here is the full text

But the English. letters are displayed perfectly, everything is as it should be. I do not know what to do, help.

  • Probably, the problem is still in the encoding of database tables. Check back to see Cyrillic encoding, for example, utf8. Try recreating the database in this encoding. - fori1ton
  • Thanks helped, the comments are now Russian too. Only in the database now Russian is not displayed and the entire text in the blog has been replaced with questions. In the database there is a comparison with utf8_general_ci. And at connection of a DB (SET NAMES cp1251 or utf8) - does not help. - alexandernoa

1 answer 1

Encoding in the PHP file write:

header('Content-type: text/html; charset=utf-8'); 

In .htaccess write:

 AddDefaultCharset UTF-8