Hi list,
I have 2 Centos 4 servers running the Horde system, apparently identical in configuration, but they are behaving differently...
On one, when emails containing a Pound Sign (£) are displayed it shows as £ (not sure if this will come through right, but it's a capital A with a 'hat' accent over it followed by the pound sign).
On the other, the Pound sign displays correctly.
I have copied the httpd.conf files over between servers and this has no effect. Looking at the page source both are en-gb and UTF8. It looks like the problem is not with Apache as the config files are identical.
Both servers are running the same version of Apache, and for that matter the same version of everything else, and all updates are applied.
Would anyone have any ideas where to start looking to track down this discrepancy?
Thanks! Andy.
centos-bounces@centos.org <> scribbled on Friday, October 20, 2006 7:57 AM:
Hi list,
I have 2 Centos 4 servers running the Horde system, apparently identical in configuration, but they are behaving differently...
On one, when emails containing a Pound Sign (£) are displayed it shows as £ (not sure if this will come through right, but it's a capital A with a 'hat' accent over it followed by the pound sign).
On the other, the Pound sign displays correctly.
I have copied the httpd.conf files over between servers and this has no effect. Looking at the page source both are en-gb and UTF8. It looks like the problem is not with Apache as the config files are identical.
Both servers are running the same version of Apache, and for that matter the same version of everything else, and all updates are applied.
Would anyone have any ideas where to start looking to track down this discrepancy?
Thanks! Andy.
Try changing AddDefaultCharset UTF-8 to AddDefaultCharset iso-8859-1 in /etc/httpd/conf/httpd.conf
This got rid of a bunch odd characters in some of my webpages. Don't forget to restart httpd after making the change.
Mike
Mike Kercher wrote:
Try changing AddDefaultCharset UTF-8 to AddDefaultCharset iso-8859-1 in /etc/httpd/conf/httpd.conf
This got rid of a bunch odd characters in some of my webpages. Don't forget to restart httpd after making the change.
Mike _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
Thanks for the suggestion Mike, unfortunately that hasn't altered things. I'm leaning towards the conclusion that Apache is not at fault here as the configuration files are identical on the servers. It looks like it's Horde that is choosing to do something to the page before it's displayed, but again the Horde package and its Pear packages have just been copied from one server to the other and so have identical configs.
Andy.
Mike Kercher wrote:
On the other, the Pound sign displays correctly.
...
Both servers are running the same version of Apache, and for that matter the same version of everything else, and all updates are applied. Would anyone have any ideas where to start looking to track down this discrepancy?
Try changing AddDefaultCharset UTF-8 to AddDefaultCharset iso-8859-1 in /etc/httpd/conf/httpd.conf
We had similar problems, and our best solution was to remove the "AddDefaultCharset" config option altogether. This allows individual pages to specify their own encoding using meta tags: <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> and browsers to properly auto detect charsets on pages that fail to explicity set them.
-- Rex
Rex Dieter wrote:
We had similar problems, and our best solution was to remove the "AddDefaultCharset" config option altogether. This allows individual pages to specify their own encoding using meta tags:
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> and browsers to properly auto detect charsets on pages that fail to explicity set them.
again no luck unfortunately. The strange thing is that both Apaches are configured the same so I would expect the same problem with both. This not being the case, I'm thinking the problem is not with Apache but with Horde or elsewhere. However Horde was copied from one server to another (it's actually the original install that's giving the problem so that rules out an error when copying across).
Thanks, Andy.
again no luck unfortunately. The strange thing is that both Apaches are configured the same so I would expect the same problem with both. This not being the case, I'm thinking the problem is not with Apache but with Horde or elsewhere. However Horde was copied from one server to another (it's actually the original install that's giving the problem so that rules out an error when copying across).
Do you have a language defined elsewhere? /etc/sysconfig/httpd, or /etc/httpd/conf.d/horde.conf, .htaccess, anything like that?
On Fri, 20 Oct 2006, Andy Wright wrote:
I have 2 Centos 4 servers running the Horde system, apparently identical in configuration, but they are behaving differently...
On one, when emails containing a Pound Sign () are displayed it shows as £ (not sure if this will come through right, but it's a capital A with a 'hat' accent over it followed by the pound sign).
On the other, the Pound sign displays correctly.
I have copied the httpd.conf files over between servers and this has no effect. Looking at the page source both are en-gb and UTF8. It looks like the problem is not with Apache as the config files are identical.
Both servers are running the same version of Apache, and for that matter the same version of everything else, and all updates are applied.
Would anyone have any ideas where to start looking to track down this discrepancy?
If you have the (oddly named) perl-libwww-perl package installed, use /usr/bin/HEAD to compare the HTTP Content-Type headers:
HEAD $url_1 | grep ^Content-Type HEAD $url_2 | grep ^Content-Type
As others have indicated, you'll probably notice that the charset value differs.
I think what I'd do is to start at top of your URL tree (typically "/") on each server and work my way down to the e-mail in question, comparing charsets at each stop down the tree. If they start the same and diverge somewhere down the line, then that's the Directory or Location to examine.
On Fri, 20 Oct 2006, Andy Wright wrote:
I have 2 Centos 4 servers running the Horde system, apparently identical in configuration, but they are behaving differently...
On one, when emails containing a Pound Sign () are displayed it shows as £ (not sure if this will come through right, but it's a capital A with a 'hat' accent over it followed by the pound sign).
On the other, the Pound sign displays correctly.
I have copied the httpd.conf files over between servers and this has no effect. Looking at the page source both are en-gb and UTF8. It looks like the problem is not with Apache as the config files are identical.
Both servers are running the same version of Apache, and for that matter the same version of everything else, and all updates are applied.
Would anyone have any ideas where to start looking to track down this discrepancy?
If you have the (oddly named) perl-libwww-perl package installed, use /usr/bin/HEAD to compare the HTTP Content-Type headers:
HEAD $url_1 | grep ^Content-Type HEAD $url_2 | grep ^Content-Type
As others have indicated, you'll probably notice that the charset value differs.
I think what I'd do is to start at top of your URL tree (typically "/") on each server and work my way down to the e-mail in question, comparing charsets at each stop down the tree. If they start the same and diverge somewhere down the line, then that's the Directory or Location to examine.
Oh dear, I feel I should hang my head in shame ! I blame it all on lack of coffee...
Many thanks to all that took the trouble to reply to what turned out to be my own self-inflicted problem....
It turns out that I had upgraded one of the servers to PHP5 to do some testing and had left it that way rather than reverting to the stock Centos PHP4. That, coupled with a rather outdated install of Horde was causing the problem. Back on PHP4 now and all is ok.
Thanks again to all, Andy.
Andy Wright wrote:
Oh dear, I feel I should hang my head in shame ! I blame it all on lack of coffee...
Many thanks to all that took the trouble to reply to what turned out to be my own self-inflicted problem....
It turns out that I had upgraded one of the servers to PHP5 to do some testing and had left it that way rather than reverting to the stock Centos PHP4. That, coupled with a rather outdated install of Horde was causing the problem. Back on PHP4 now and all is ok.
Thanks again to all,
Hi Andy,
just interested - did you check /etc/sysconfig/i18n in both systems? What's in there on each of the systems? regards, Michael
Michael Kress wrote:
Andy Wright wrote:
Oh dear, I feel I should hang my head in shame ! I blame it all on lack of coffee...
Many thanks to all that took the trouble to reply to what turned out to be my own self-inflicted problem....
It turns out that I had upgraded one of the servers to PHP5 to do some testing and had left it that way rather than reverting to the stock Centos PHP4. That, coupled with a rather outdated install of Horde was causing the problem. Back on PHP4 now and all is ok.
Thanks again to all,
Hi Andy,
just interested - did you check /etc/sysconfig/i18n in both systems? What's in there on each of the systems? regards, Michael
Hi,
that file on both servers contains the same (Lang=en_GB.UTF8)
The reason I was so convinced that the servers were identical was that one was installed from a MondoArchive image of the other - I'd completely forgotten that I later updated one to PHP5 to do some testing one day. That'll teach me ! All working fine now that I've gone back to PHP4.
Andy.