I'm sure I've been here before but I can't remember the answer (and the mailing list archives don't appear to be searchable).
What are the rules that govern how a browser (Firefox in particular) decides on what Character Encoding to use?
I'm viewing some pages which are on my home (Fedora 7) machine and thus are sent by apache 2.2 on that machine using Firefox here at work (version 2.0.0.5).
The pages have the occasional accented character and pound sign in them so I need to get the Character Encoding right.
Although Firefox is set to default to UTF-8 it's actually using ISO-8859-1 for the pages in question which doesn't work, my accented characters and pound signs are garbled. If I manually select UTF-8 in Firefox all is well. The page headers indicate the character set to be UTF-8, Firefox defaults to UTF-8 but obviously something is telling it otherwise, what? Is it some setting of apache that does it, if so can someone tell me what please.
On Monday 11 February 2008 13:27:28 Chris G wrote:
(and the mailing list archives don't appear to be searchable).
Google has a "site:" option so you can search for, for example:
site:lists.alug.org.uk "chris g"
It works a bit.
Cheers, Richard
Chris G cl@isbd.net asked:
What are the rules that govern how a browser (Firefox in particular) decides on what Character Encoding to use?
I found this answer:
"In the case of conflict between multiple encoding declarations, precedence rules apply to determine which declaration wins out. For XHTML and HTML, the precedence is as follows, with 1 being the highest:
1. HTTP Content-Type 2. XML declaration 3. meta charset declaration 4. link charset attribute "
at http://www.w3.org/International/tutorials/tutorial-char-enc/#Slide0400
Hope that helps,
On Mon, Feb 11, 2008 at 02:08:08PM +0000, MJ Ray wrote:
Chris G cl@isbd.net asked:
What are the rules that govern how a browser (Firefox in particular) decides on what Character Encoding to use?
I found this answer:
"In the case of conflict between multiple encoding declarations, precedence rules apply to determine which declaration wins out. For XHTML and HTML, the precedence is as follows, with 1 being the highest:
1. HTTP Content-Type 2. XML declaration 3. meta charset declaration 4. link charset attribute
"
at http://www.w3.org/International/tutorials/tutorial-char-enc/#Slide0400
That explains it, thank you, it's the "HTTP Content-Type" that's setting ISO-8859-1 presumably, now to find what sets that! OK, that's easy, it's in the apache configuration file.
Thanks again. (I'll try and remember where this is this time, I'm sure I'll get bitten again some time)