Re: Character encoding in CSS

Hi Yves,

It's chilly here in Boulder this morning, isn't it.

> I didn't find anything in the CSS1 or CSS2 specifications indicating how
> to declare encoding for a CSS file. It's clearly defined how to encode

I'm not an expert on CSS at all, but I found CSS2 defines how the
encoding should be determined in cahpter 4.4 CSS document
representation (http://www.w3.org/TR/REC-CSS2/syndata.html#q23). The
following is an excerpt from it.

When a style sheet is embedded in another document, such as in the STYLE element or "style" attribute of HTML, the style sheet shares the
character encoding of the whole document. 

When a style sheet resides in a separate file, user agents must observe the following priorities when determining a document's character
encoding (from highest priority to lowest):

    1.An HTTP "charset" parameter in a "Content-Type" field. 
    2.The @charset at-rule. 
    3.Mechanisms of the language of the referencing document (e.g., in HTML, the "charset" attribute of the LINK element). 

Hope this helps.

-------------------
Shigemichi Yazawa
yazawa@diac.com

Received on Monday, 6 November 2000 12:38:51 UTC