You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Predrag Lezaic <pr...@elyminnesota.com> on 2004/11/16 16:19:57 UTC

[users@httpd] Same document encoed differently on 1.3 and 2.0

Hello,

I recently started running 2.0 web server. Ever since I did that my 
customers started complaining about the problems with the encoding of 
their documents. I just did an experiment with one of mine customers 
today and it turned out that same document that we uploaded to 1.3 
server (different machine) displayed correctly while when we uploaded it 
to the current site on 2.0 server, the encoding showewd with bunch of 
questionmarks and both Firefox and IE 6 had problems displaying it 
correctly.

Does anyone here know about this problem with HTTPD 2.0 and is there a 
way to fix the problem?

Here are links to both versions:

1.3     http://www.clwsd.org/minutes/12-10-2002Board.htm
2.0     http://www.cranelaketwp.com/minutes/12-10-2002Board.htm


I know that they are Word 2000 documents saved as htm and I prefer not 
to argue with customers about doing things that way. The problem in 
their eye is with my server since the server at the other ISP displays 
the same document just fine.

Thank you very much for any suggestions you might have.
Predrag


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Same document encoed differently on 1.3 and 2.0

Posted by Predrag Lezaic <pr...@elyminnesota.com>.
Joshua Slive wrote:

>On Tue, 16 Nov 2004 09:54:47 -0600, Predrag Lezaic
><pr...@elyminnesota.com> wrote:
>  
>
>>Joshua Slive wrote:
>>    
>>
>>>Check the AddDefaultCharset directive on your two installs.  Redhat
>>>has changed the default value in their apache 2 installs.
>>>      
>>>
>
>  
>
>>I looked at my 2.0 machine and in /etc/httpd/conf/httpd.conf
>>AddDefaultCharset is set to UTF-8. I don't have access to the machine
>>that is running on 1.3. That is my customers other service provider.
>>What should directive say?
>>    
>>
>
>It should say whatever character set your clients have used to encode
>their documents.  A good guess is ISO-8859-1, which is the default as
>distributed from httpd.apache.org.
>
>Joshua
>

Thanks Joshua, I changed it to ISO-8859-1 and restarted HTTPD service. 
That did it. Thanks for your help.

Predrag


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Same document encoed differently on 1.3 and 2.0

Posted by Nick Kew <ni...@webthing.com>.
On Tue, 16 Nov 2004, Predrag Lezaic wrote:

> >> It should say whatever character set your clients have used to encode
> >> their documents.  A good guess is ISO-8859-1, which is the default as
> >> distributed from httpd.apache.org.

Indeed.  On a server with multiple unprivileged users you might want to
enable them to set it in .htaccess, and document the fact.

> > Or it could say "Off", which I prefer; this allows individual HTML
> > documents to declare their character set using meta headers.  These
> > headers are overwritten by the AddDefaultCharset directive.

The <meta ...> thing is a nasty hack, and falls down completely for
non-HTML documents, or even for HTML in a character set that's not
a superset of ASCII.

> > There is a potential security issue here though; something to do with
> > cross-site scripting and an Internet Explorer bug I think.

That's quite old now; I'm not sure if it's still relevant.  But there
are other concerns, especially if you serve XML - where the browser
MUST treat it as plain ASCII if no charset is set in the HTTP headers.

It really is worthwhile getting this right!

If you want support for HTML <meta http-equiv ...>, you can use a module
such as mod_publisher that converts them to a real HTTP headers.

-- 
Nick Kew

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Same document encoed differently on 1.3 and 2.0

Posted by Predrag Lezaic <pr...@elyminnesota.com>.
Phil Endecott wrote:

>>> I looked at my 2.0 machine and in /etc/httpd/conf/httpd.conf
>>> AddDefaultCharset is set to UTF-8. I don't have access to the machine
>>> that is running on 1.3. That is my customers other service provider.
>>> What should directive say?
>>
>>
>> It should say whatever character set your clients have used to encode
>> their documents.  A good guess is ISO-8859-1, which is the default as
>> distributed from httpd.apache.org.
>
>
> Or it could say "Off", which I prefer; this allows individual HTML 
> documents to declare their character set using meta headers.  These 
> headers are overwritten by the AddDefaultCharset directive.
>
> There is a potential security issue here though; something to do with 
> cross-site scripting and an Internet Explorer bug I think.
>
> Phil.


I like Off even better. Thanks Phil.

Predrag


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Same document encoed differently on 1.3 and 2.0

Posted by Phil Endecott <sp...@chezphil.org>.
>>I looked at my 2.0 machine and in /etc/httpd/conf/httpd.conf
>>AddDefaultCharset is set to UTF-8. I don't have access to the machine
>>that is running on 1.3. That is my customers other service provider.
>>What should directive say?
> 
> It should say whatever character set your clients have used to encode
> their documents.  A good guess is ISO-8859-1, which is the default as
> distributed from httpd.apache.org.

Or it could say "Off", which I prefer; this allows individual HTML 
documents to declare their character set using meta headers.  These 
headers are overwritten by the AddDefaultCharset directive.

There is a potential security issue here though; something to do with 
cross-site scripting and an Internet Explorer bug I think.

Phil.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Same document encoed differently on 1.3 and 2.0

Posted by Joshua Slive <js...@gmail.com>.
On Tue, 16 Nov 2004 09:54:47 -0600, Predrag Lezaic
<pr...@elyminnesota.com> wrote:
> Joshua Slive wrote:
> >Check the AddDefaultCharset directive on your two installs.  Redhat
> >has changed the default value in their apache 2 installs.

> I looked at my 2.0 machine and in /etc/httpd/conf/httpd.conf
> AddDefaultCharset is set to UTF-8. I don't have access to the machine
> that is running on 1.3. That is my customers other service provider.
> What should directive say?

It should say whatever character set your clients have used to encode
their documents.  A good guess is ISO-8859-1, which is the default as
distributed from httpd.apache.org.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Same document encoed differently on 1.3 and 2.0

Posted by Predrag Lezaic <pr...@elyminnesota.com>.
Joshua Slive wrote:

>On Tue, 16 Nov 2004 09:19:57 -0600, Predrag Lezaic
><pr...@elyminnesota.com> wrote:
>  
>
>>Hello,
>>
>>I recently started running 2.0 web server. Ever since I did that my
>>customers started complaining about the problems with the encoding of
>>their documents. I just did an experiment with one of mine customers
>>today and it turned out that same document that we uploaded to 1.3
>>server (different machine) displayed correctly while when we uploaded it
>>to the current site on 2.0 server, the encoding showewd with bunch of
>>questionmarks and both Firefox and IE 6 had problems displaying it
>>correctly.
>>    
>>
>
>Check the AddDefaultCharset directive on your two installs.  Redhat
>has changed the default value in their apache 2 installs.
>
>Joshua.
>
I looked at my 2.0 machine and in /etc/httpd/conf/httpd.conf 
AddDefaultCharset is set to UTF-8. I don't have access to the machine 
that is running on 1.3. That is my customers other service provider. 
What should directive say?

Thanks,
Predrag


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Same document encoed differently on 1.3 and 2.0

Posted by Joshua Slive <js...@gmail.com>.
On Tue, 16 Nov 2004 09:19:57 -0600, Predrag Lezaic
<pr...@elyminnesota.com> wrote:
> Hello,
> 
> I recently started running 2.0 web server. Ever since I did that my
> customers started complaining about the problems with the encoding of
> their documents. I just did an experiment with one of mine customers
> today and it turned out that same document that we uploaded to 1.3
> server (different machine) displayed correctly while when we uploaded it
> to the current site on 2.0 server, the encoding showewd with bunch of
> questionmarks and both Firefox and IE 6 had problems displaying it
> correctly.

Check the AddDefaultCharset directive on your two installs.  Redhat
has changed the default value in their apache 2 installs.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org