Helpful Reply

If there is a difference between the character encoding information from the page and from the headers then Firefox always uses the information from the headers. So normally this is a problem with the server configuration.
If you provide a link then we can see what the server is sending.
You can also post the headers on this forum if you want help with that.
It is also possible that an add-on or an external program is messing with encoding. You can try to start Firefox in the Safe Mode to see if that helps.

If there is a difference between the character encoding information from the page and from the headers then Firefox always uses the information from the headers. So normally this is a problem with the server configuration.<br>
If you provide a link then we can see what the server is sending.<br>
You can also post the headers on this forum if you want help with that.<br>
It is also possible that an add-on or an external program is messing with encoding. You can try to start Firefox in the Safe Mode to see if that helps.

Question owner

Thank you for looking into the matter.
No, I'm sorry I cant provide a link, as the page is on our intranet.

You wrote: If there is a difference between the character encoding information from the page and from the headers then Firefox always uses the information from the headers. How can I check for such a difference?

The header of the page contains a content="text/html; charset=ISO-8859-1" directive and page info says also ISO-8859-1.

As all characters are correctly displayed when I manually switch from UTF-8 to ISO-8859-1, I suppose there are no characters that might Firefox make think the encoding might not be what the header says.

Further more the default charset in "Preferences" is also set to ISO-8859-1.
Gerhard

Thank you for looking into the matter.
No, I'm sorry I cant provide a link, as the page is on our intranet.
You wrote: ''If there is a difference between the character encoding information from the page and from the headers then Firefox always uses the information from the headers.'' How can I check for such a difference?
The header of the page contains a '''content="text/html; charset=ISO-8859-1"''' directive and page info says also ISO-8859-1.
As all characters are correctly displayed when I manually switch from UTF-8 to ISO-8859-1, I suppose there are no characters that might Firefox make think the encoding might not be what the header says.
Further more the default charset in "Preferences" is also set to ISO-8859-1.
Gerhard

To see what http-headers a webserver is sending, you can use several programs, for example:
* the addon LiveHttpHeaders https://addons.mozilla.org/nl/firefox/addon/live-http-headers
* the addon Firebug https://addons.mozilla.org/nl/firefox/addon/firebug/
* the program Fiddler2 from Microsoft http://www.fiddler2.com/fiddler2/

Question owner

Helpful Reply

That usually happens if the server sends the file as UTF-8.
As posted above, Firefox ignores the meta header if the server send an encoding via the HTTP response headers.
In such a case you need to change the encoding yourself or contact the owner and ask them to setup the server correctly.

See also Tools > Page Info > General , also accessible via the right-click context menu on a web page.

That usually happens if the server sends the file as UTF-8.<br />
As posted above, Firefox ignores the meta header if the server send an encoding via the HTTP response headers.<br />
In such a case you need to change the encoding yourself or contact the owner and ask them to setup the server correctly.
See also Tools > Page Info > General , also accessible via the right-click context menu on a web page.
----
*Content Preferences: https://addons.mozilla.org/firefox/addon/content-preferences/

Question owner

Firefox ignores the meta header if the server send an encoding via the HTTP response headers., that describes the situation.
I removed the line:

AddDefaultCharset UTF-8

from httpd.conf
and Firefox displays the page correctly.

BUT: is this behavior (ignoring the meta headers) intentionally or is it a bug? The Apache directive is named "AddDefaultCharset" which suggests it would be only used as a default (if no encoding is specified?)

Gerhard

Thank you all!
''Firefox ignores the meta header if the server send an encoding via the HTTP response headers.'', that describes the situation.
I removed the line:
'''AddDefaultCharset UTF-8'''
from httpd.conf
and Firefox displays the page correctly.
BUT: is this behavior (ignoring the meta headers) intentionally or is it a bug? The Apache directive is named "AddDefaultCharset" which suggests it would be only used as a default (if no encoding is specified?)
Gerhard

This is intentional. The meta tag is only used if there is no reliable way to determine the encoding like based on a protocol. If there is reliable information because it is send over http, then that information must be used.
This AddDefaultCharset probably means that a content type of UTF-8 is sent if there is no content information on the server about a specific file. This is a serverside setting. A browser only looks at the http-headers that are actually sent.
For the http specification the default content type is iso8859-1 if there is a missing header. But this should never happen because a webserver must always send proper content-type information.https://developer.mozilla.org/en/HTML/Element/meta

This is intentional. The meta tag is only used if there is no reliable way to determine the encoding like based on a protocol. If there is reliable information because it is send over http, then that information must be used.<br>
This AddDefaultCharset probably means that a content type of UTF-8 is sent if there is no content information on the server about a specific file. This is a serverside setting. A browser only looks at the http-headers that are actually sent.
For the http specification the default content type is iso8859-1 if there is a missing header. But this should never happen because a webserver must always send proper content-type information.<br>
https://developer.mozilla.org/en/HTML/Element/meta<br>

Question owner

Thank you for your clarification!
Up to now I wasn't aware of the difference between a "raw HTTP header" and the meta-elements within the head-tag.
I re-inserted the "AddDefaultCharset UTF-8" directive in the config file and added a "header('Content-Type: text/html; charset=iso-8859-1');" statement to my script and it worked like you said! ;-)

Gerhard

Thank you for your clarification!<br>
Up to now I wasn't aware of the difference between a "raw HTTP header" and the meta-elements within the head-tag.<br>
I re-inserted the "AddDefaultCharset UTF-8" directive in the config file and added a "header('Content-Type: text/html; charset=iso-8859-1');" statement to my script and it worked like you said! ;-)
Gerhard

There is a Google Blogger blog (not mine). The page header has a UTF-8 tag and always displaying on SO-8859-1, never obeying to the chosen character setting. As almost everyone know Blogger and for me this happens only with this blog as can be seen I wonder what can be wrong:

This happens both on Firefox and IE. Every other blog displays properly for me. I don't think this will be from the server.

I read this thread, but I still find a problem.
There is a Google Blogger blog (not mine). The page header has a UTF-8 tag and always displaying on SO-8859-1, never obeying to the chosen character setting. As almost everyone know Blogger and for me this happens only with this blog as can be seen I wonder what can be wrong:
[http://jose-pires-um-ser-livre.blogsopt.com/ http://jose-pires-um-ser-livre.blogsopt.com/]
This happens both on Firefox and IE. Every other blog displays properly for me. I don't think this will be from the server.

Yes knorretje, it makes me believe believe the page is sent as ISO-8859-1, but how can that be if Blogger always uses UTF-8, and as it seems that blog is hosted at Blogger? That is exactly why I don't understand. I can't believe Blogger makes n exception.

Yes knorretje, it makes me believe believe the page is sent as ISO-8859-1, but how can that be if Blogger always uses UTF-8, and as it seems that blog is hosted at Blogger? That is exactly why I don't understand. I can't believe Blogger makes n exception.

@Straydog
The blog is not hosted at blogger but at blogsopt.com. They load stuff from blogger so it looks like its from blogger. I do not know why they do that or if blogger is allowing that. You will have to ask that to blogsopt and blogger. Please use the programs I mentioned before to see what is going on.

@Straydog<br>
The blog is not hosted at blogger but at blogsopt.com. They load stuff from blogger so it looks like its from blogger. I do not know why they do that or if blogger is allowing that. You will have to ask that to blogsopt and blogger. Please use the programs I mentioned before to see what is going on.