FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 02-06-2008, 09:45 PM
Carles Pagès
 
Default Problems with apache2 and charsets

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.

--
"Crazy, but that's how it goes
Millions of people living as foes
Maybe it's not too late
To learn how to love, and forget how to hate"


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 
Old 02-06-2008, 10:36 PM
Gilles Mocellin
 
Default Problems with apache2 and charsets

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
 
Old 02-07-2008, 07:32 AM
Carles Pagès
 
Default 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.


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
 

Thread Tools




All times are GMT. The time now is 04:01 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2007 - 2008, www.linux-archive.org