UTF-8 Russian text chaotic on one server but not other
I helped a Ukrainian friend to make a website. The development version is on my server:
When everything was ready and he uploaded it to his own server in Ukraine, the Cyrillic text is a total chaos of wrong characters:
But the encoding is UTF-8, which was supposed to solve forever these character encoding issues!?
What is even more interesting is that source code of the page contains the correct UTF-8 characters: the text is perfectly readable Russian, if you right-click the page and see source in Notepad. Also if saved to your local computer with .html extension, the text is shown correctly when opened with a web browser.
Any ideas what else I can do to solve this problem, except downgrading the encoding from Unicode age back to the encodings of previous millennium, which I expect to easily solve the problem?
The website is based on one php file, which is saved in Notepad+ as UTF-8 without BOM.
You are right, it is UTF-8 and the meta-tag says it is UTF-8. But the HTTP-header says it is windows-1251. You can verify that with HttpFox, if you'd like.
Browsers tend to listen more to the HTTP-header, than the html-meta equivalent.
Run this line of php-code before displaying the webpage:
header("Content-Type: text/html; charset=UTF-8");
Your advice solved the problem.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)