RE: [SumsaultRT #212] example of sending correct headers with Apache?

> -----Original Message-----
> From: public-evangelist-request@w3.org 
> [mailto:public-evangelist-request@w3.org] On Behalf Of 
> Dominique Hazaël-Massieux
> Sent: 24 September 2003 16:54
> To: Mark Stosberg
> Cc: public-evangelist@w3.org
> Subject: Re: [SumsaultRT #212] example of sending correct 
> headers with Apache?
> 
> 
> Le mer 24/09/2003 à 17:51, Mark Stosberg a écrit :
> > I was just reading here about character encodings:
> >
> > Down in section C.9, it states: "the best approach is to 
> ensure that 
> > the web server provides the correct headers. "
> > 
> > I would like to do this, but I'm unsure of how to configure 
> my Apache 
> > web server to send the correct headers by default. Could 
> someone post 
> > an example of what the correct headers would be and/or an 
> example of a 
> > "correct" Apache configuration for this?
> 
> Provided that all your xhtml files have a uniform extension 
> (say .html) and a uniform encoding (say iso-8859-1), and 


Of course (being in internationalization but also from a practical
standpoint), I'd suggest UTF-8 as a preferred uniform encoding -
especially useful if you ever need to stray outside Latin1 (eg. for
turkey, czech republic, etc - not just arabic, chinese, etc.)


> provided that you serve them as text/html (but this applies 
> trivially to application/xhtml+xml), you can add (or amend an 
> existing entry) the following directive:
> AddType text/html;charset=iso-8859-1	html


One thing to bear in mind (that many don't realise) is that this
directive applies to all files in all subdirectories below the point
where you add it.  You, of course, always have the possibility to
override it by adding another directive lower down if needs be.

Hope that helps,
RI



> 
> Hope this helps,
> 
> Dom
> -- 
> Dominique Hazaël-Massieux - http://www.w3.org/People/Dom/ 
> W3C/ERCIM mailto:dom@w3.org
> 

Received on Wednesday, 24 September 2003 12:39:54 UTC