Web Hosting Talk







View Full Version : does Codepage depend on Apache server settings?


tirins
04-16-2004, 10:45 AM
Hi

I have apache server installed on my local machine. There are several sites hosted on it and a few of them are in Russian.

The trouble I experience that whenever I load a russian site from localhost in browser I get a lot of garbage text, I than switch code page to windows-1251 and now everything is ok.. until I press browser's Refresh button or follow link to another page. Why code page does not stay the same for every page I load on localhost? Inside html files' meta tag code page is accurately specified , I checked it 100's times.

On the other hand, when I view this same site when it is placed on my hosting provider's server, code page is recognised properly ...

Why is it happening? Should I change some configurations in apache?

Please help.

Mdot
04-16-2004, 11:05 PM
to answer in short - yes, and no.
It is HTTP header that specifies codepage (e.g. "Content-Type: text/html; charset=ISO-8859-1"). This can be done from webserver part (e.g. Russian Apache, for Russian sites), or from script, example:


#!/usr/bin/perl

print "Content-Type: text/html\; charset\=ISO\-8859\-1\n\n";


regards,
M.