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

Character encoding in CSS

From: Yves Savourel <ysavourel@translate.com>
Date: Mon, 6 Nov 2000 08:54:35 -0700
Message-ID: <002101c04809$df833f40$9e8dfea9@sykes.com>
To: <www-international@w3.org>

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 UCS characters with the \HHH mechanism, but if comments are in a given language the encoding of the file should be able to support it.
I also noticed that Netscape 6 treats CSS file as iso-8859-1, regardless the encoding declaration of the calling XML document and/or the encoding of the CSS file itself. It also not seems to supports UTF-16 CSS files.

Based on those tries I came up with the following answers to my questions. Is this correct?

Question: How to declare encoding for CSS file?
Assumed Answer: You don't: it will be treated as iso-8859-1 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?
Assumed Answer: No, or at least, it's not required from the CSS parsers to support it.

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.

Received on Monday, 6 November 2000 10:55:52 UTC

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