04-16-2004, 10:45 AM #1Junior Guru Wannabe
- Join Date
- May 2002
does Codepage depend on Apache server settings?
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?
04-16-2004, 11:05 PM #2Web Hosting Master
- Join Date
- Feb 2002
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";
M.Powered by AMD & FreeBSD.
"Documentation is like sex:
when it is good, it is very, very good;
and when it is bad, it is better than nothing."