Wednesday, 4 January 2017

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



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:







Company name, etc



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.


Answer




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



AddDefaultCharset utf-8

No comments:

Post a Comment

c++ - Does curly brackets matter for empty constructor?

Those brackets declare an empty, inline constructor. In that case, with them, the constructor does exist, it merely does nothing more than t...