[thelist] HTML Document Encoding

Pierre Lemieux plemieux at neomedia.com
Wed Oct 1 17:10:26 CDT 2003


I need help understand how document encoding work on web pages.

Here is my questions:

--
Does the order of the content-type meta in the head is important?
Should it appears first, before any other element?

Someone argued with me that it can make a difference but I don't think so.

--
What is suppose to happen if a document is encoded in UTF-8 but the
content-type is set to 8859-1?

It appears browsers do not bother but search engines do: accented characters
display correctly in the browser but are scrambled in search results
(Google). 
Example:
            MSIE displays café (café)
            Google displays café (café)

I suppose setting the content-type to UTF-8 will remove any ambiguity but
I'm still puzzled by this behavior.

--
As it appears to me, encoding can be affected by:

    - the content-type
    - the encoding of the document
    - the server
    - the development environment (web.config in .Net)
    - the applications (databases, editors)
    - the OS (I use Mac and Windows)

Any references which can help me understand how all those interact would be
welcomed!

-- 

Pierre Lemieux
Charge de projets
Neomedia inc.
T 418.687.6048
F 418.687.1161




More information about the thelist mailing list