You are here: Re: Multiple Language Website « HTML « IT news, forums, messages
Re: Multiple Language Website

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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация