W3C home > Mailing lists > Public > www-international@w3.org > October to December 2000

Re: Character encoding in CSS

From: Shigemichi Yazawa <yazawa@diac.com>
Date: Mon, 06 Nov 2000 10:47:16 -0700
Message-ID: <87y9yxj8m3.wl@globalsight.com>
To: www-international@w3.org
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
Received on Monday, 6 November 2000 12:38:51 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 21 September 2016 22:37:20 UTC