Posted by Toby Inkster on 06/16/05 09:32
Jukka K. Korpela wrote:
> The server should be configured to send e.g.
> Content-Type:·text/html; charset=utf-8
> if your files are UTF-8 encoded. If you cannot do that, check if you
> can make the server send _no_ charset parameter in that header
The OP has already stated that he's using PHP. In which case, sending an
appropriate header is as simple as putting this in an include file (say
"headers.php":
<?php
$ua = $_SERVER['HTTP_USER_AGENT'];
if (preg_match('/^Mosaic/',$ua))
{
header("Content-Type: text/html");
}
else
{
header("Content-Type: text/html; charset=utf-8");
}
?>
and then including it at the top of every file like this:
<?php require_once "headers.php"; ?>
<!DOCTYPE ....
--
Toby A Inkster BSc (Hons) ARCS
Contact Me ~ http://tobyinkster.co.uk/contact
[Back to original message]
|