|
Posted by Alan J. Flavell on 09/16/05 14:20
On Fri, 16 Sep 2005, dorayme wrote:
> > From: "Alan J. Flavell" <flavell@physics.gla.ac.uk>
> >
> > Failing that, http://www.w3.org/International/O-HTTP-charset
> > might offer some useful hints.
>
> OK... I took a look. I usually just put
>
> <meta http-equiv="Content-Type" content="text/html;
> charset=iso-8859-1">
Or, presumably, whatever other character encoding scheme (e.g utf-8) one
is using in one's document...
> in the head and no one seems to have had any trouble with my
> websites on this account.
well, that will indeed achieve the intended result if the server is
not already sending a contradictory "charset" value on a real HTTP header,
(something which seems to be happening more often nowadays).
The real HTTP header is authoritative: you can't override it with
a "meta", you have to find out how to tame the server.
> But I understand it is not the best.
This is also my opinion, although opinions do vary. But one item of the
underlying theory is fixed, whatever one's opinion: if the server is
sending out a contradictory HTTP header, then it has to be tamed, no way
around it.
If it isn't doing that, then one does still have the option, agreed.
> So be a sport and just say what else I should do exactly.
Personally, I'd use AddCharset in a .htaccess file (that's for
Apache-based servers, of course), just like it said in the cited W3C
page (I hope you read that far ;-)
But that depends not only on what server it is, but also what facilities
it has opened to its document owners. That's why there isn't a single
correct answer, and that's why I offered a pointer to a whole menagerie of
possibilities, one or more of which may be open to the questioner.
What it comes down to is that one has to ask one's server nicely to send
the appropriate HTTP header, but what "nicely" means depends very much on
circumstances. Sorry, don't blame me, that's just the way that it is: I
wasn't deliberately trying to be obscure, even if it looked that way.
[Back to original message]
|