Re: Request for an Apache configuration change



On 3/04/2004 2:37 AM, Jonathan Blandford wrote:

Carlos Perelló Marín <carlos gnome org> writes:
With the recent widget.gnome.org changes the Apache server serves by
default all content as UTF-8 but all our pages are not in UTF-8 and we
have some problems like:
Long term we need to serve all our pages in UTF-8.
Sure, but that isn't directly relevant to the problem at hand.

The AddDefaultCharset option just blindly adds "charset=foo" to the end of all text/* mime types served by the web server. It doesn't actually check whether the pages are in that encoding.

Now if the page gets served just as "text/html", the web browser will do charset detection (by looking for an appropriate <meta> tag). If a charset is specified in both the <meta> tag and the Content-type HTTP header, the Content-type header wins (even though the <meta> tag is probably more accurate).

If we move our documents over to UTF-8 and include correct <meta> tags (xsltproc will automatically insert them for files it processes), then everything will work.

The way apache suggests you work is to use the AddDefaultCharset directive to set a default, then put a suffix (like .iso8859-1 or .utf8) on all files with a different encoding. This doesn't really seem manageable for our current set of content.

James.

--
Email: james daa com au
WWW:   http://www.daa.com.au/~james/





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]