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

Re: Character encoding in CSS

From: Chris Lilley <chris@w3.org>
Date: Fri, 10 Nov 2000 02:26:49 +0100
Message-ID: <3A0B4ED9.97653FA6@w3.org>
To: Yves Savourel <ysavourel@translate.com>
CC: www-international@w3.org

> Yves Savourel wrote:

> Question: How to declare encoding for CSS file?
Since the MIME type for CSS is text/css you declare the encoding using the
unfortunately-named 'charst' parameter. 

> Assumed Answer: You don't: 

You can

> it will be treated as iso-8859-1 

Did you try with alternative charset parameters? If you did not, and
transferred the stylesheet using HTTP, Netscape 6 was correct in assuming

> and all the
> meaningful characters (the ones in properties: font names, content,
> quotes, etc. as well as the one in identifiers (selectors, IDs, class
> names, etc.)) should always be coded with the \HHH mechanism. Comments
> can be in any 8-bit encodings you want: it's doesn't bother the
> processors.


> Question: Can you have CSS files encoded in UTF-16?

Yes, no problem.

> Assumed Answer: No, or at least, it's not required from the CSS
> parsers to support it.

When you tried this, were your files correctly declared to be in UTF-16 or
did you just encode the file in UTF-16 and expect the CSS processor to
figure it out itself?

> Question: How CSS imported with an @import rule behave?
> Assumed Answer: Imported CSS are interpreted independently from the
> calling CSS, they could be in a different encoding, once parsed the text
> is in UCS regardless the original encoding.

Correct. Similarly, for external style sheets, the encoding of the XML file
is irrelevant.

Received on Saturday, 11 November 2000 09:55:00 UTC

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