Browser displaying page in UTF-8 instead of windows-1251

apache, character-encoding, cp1251, encoding

Solution

I commented out the following line in `httpd.conf`, restarted httpd and everything displays correct now:

AddDefaultCharset utf-8

Problem

I have a website, it contains html only, and there is a lot of cyrillic symbols. Browser is setting the UTF-8 encoding, instead of windows-1251, like it should be. So, english letters displays fine, but every cyrillic symbols is like ���� Here is my setup: RHEL 6.3 (2.6.32-279.el6.x86_64) Apache/2.2.15 (Unix) Here is my .htaccess file: ``` Options +Includes AddDefaultCharset WINDOWS-1251 ``` First lines of the page: ``` <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <title>Company name, etc</title> <meta http-equiv="Content-Type" content="text/html; charset=WINDOWS-1251"> ``` Example page on pastebin or phpfiddle for those who don't have access to pastebin So, charset is set everywhere, and if I mannualy change the encoding in the browser to windows-1251 - it displays just fine, but autodetect sets the utf-8, and I don't know why. If it helps - site was hosted on Sun OS 5.10 before. Thanks for any help.

Original source

Related problems