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

Re: Problems with apache2 and charsets

On Thu, Feb 07, 2008 at 12:36:54AM +0100, Gilles Mocellin wrote:
> Le Wednesday 06 February 2008 23:45:34 Carles Pagès, vous avez écrit :
> > Hello,
> >
> > My apache seems to ignore the charset meta data in the html files, so
> > iso-8859-1 htmls are not properly displayed. If I store them in utf-8,
> > then there is no problem, even if iso-8859-1 is specified in the meta
> > headers.
> >
> > If I specify the default charset in the apache conf file to be
> > iso-8859-1 then the iso pages are shown correctly but not utf-8 ones.
> >
> > So, does anyone know what could be causing this behaviour? I'm using
> > apache2 in debian stable, if that helps.
> >
> > Thanks in advance.
> UTF8 is a forced default in Debian's Apache2.
> To make apache respect meta tags, comment that line :
> gilles@guitare:~$ cat /etc/apache2/conf.d/charset
> # Read the documentation before enabling AddDefaultCharset.
> # In general, it is only a good idea if you know that all your files
> # have this encoding. It will override any encoding given in the files
> # in meta http-equiv or xml encoding tags.
> #AddDefaultCharset UTF-8
Thanks a lot! That solved my problem. I didn't know the default charset
was being forced in that file. I saw the "AddDefaultCharset" directive
commented in apache2.conf and assumed it wasn't being forced anywhere
else. Moreover, this comment stating that the directive overrides any
encoding on the meta does not appear in my conf.d/charset file.

By the way, why is utf-8 forced by default? I've looked it up but found
no explanation.

Reply to: