W3C home > Mailing lists > Public > www-validator-css@w3.org > September 2004

Re: HTTP header. Invalidity of setting charset in html.

From: Jens Brueckmann <lists@j-a-b.net>
Date: Wed, 15 Sep 2004 14:16:04 +0200
To: www-validator-css@w3.org
Message-ID: <opseda02ljbcgun6@smtp2.kontent.de>

On Wed, 15 Sep 2004 18:02:13 +0930 (CST), Michael Talbot-Wilson  
<mtw@view.net.au> wrote:

> And, incidentally, I've been unable to discover in the source, the
> config file or the docs how to set the charset in the header.  I have
>
>      AddCharset utf-8 .en .html
>
> for the virtual host and see no complaint in the log file.  (Using
> Apache 1.3.14.)

You can either set the HTTP-header using server-sided scripting like php:

     <?php
       header ("Content-type: text/html; charset=utf-8");
     ?>

or in the Apache server configuration as a directive included either in  
virtual hosts, directory or .htaccess using:

     AddDefaultCharset utf-8

   or

     AddDefaultCharset Off

(when no default charset is specified the server uses its own default  
charset iso-8859-1)

Cheers,



jens

-- 
Opera/7.54 (X11; Linux x86_64; U) [en]
Received on Wednesday, 15 September 2004 12:15:35 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 27 June 2012 00:14:15 GMT