P
P
pratamishus2011-06-10 08:23:15
Character encoding
pratamishus, 2011-06-10 08:23:15

The browser does not listen to the encoding command. what to do?

I've been a PHP developer for 7 years and have never seen anything like this. Installed the site on the customer's server on Russian hosting (nic.ru). Everything is in UTF-8 encoding. As always, I put down all the headers and settings in the database:

in html - meta http-equiv="Content-Type" content="text/html; charset=utf-8"
in PHP at the beginning of the file - header('Content-Type: text/html; charset=UTF-8');
in MySQL (the database itself and all tables) - MySQL charset: UTF-8 Unicode (utf8)
all files including css and js in UTF-8 without BOM

Everywhere UTF-8. Everything works fine on the locale, on the test server on the media temple it also works without problems ( http://horses.iconizer.net/ ). However, the site from the customer's server is issued in win-1251 encoding. Website http://www.reitanlage-loehne.com/. Tell me please, can anyone met with this? Maybe the problem is in the hosting itself?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
D
d4rkr00t, 2011-06-10
@pratamishus

try in .htaccess
CharsetDisable on
CharsetDefault utf-8
CharsetSourceEnc utf-8
AddDefaultCharset utf-8

@
@antoo, 2011-06-10
_

The problem is in the server setup. It returns:
Content-Type=text/html; charset=windows-1251

K
Konstantin Kitmanov, 2011-06-10
@k12th

What is written in the Apache config?

A
Alexander, 2011-06-10
@akalend

of course, they have already answered (in relation to Apache), but for the future:
the browser gives the advantage of HTTP-Header, then meta-html,
i.e. if there are problems with encoding, then first of all we look at the response headers of the HTTP server (any), then what set to meta http-equiv="Content-Type"

R
Riateche, 2011-06-10
@Riateche

In the nickhost control panel for the site, you need to specify the correct encoding.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question