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

Re: Character encoding in CSS

From: Bert Bos <bert@w3.org>
Date: Tue, 7 Nov 2000 03:12:04 +0100 (MET)
To: "Yves Savourel" <ysavourel@translate.com>
Cc: <www-international@w3.org>
Message-ID: <14855.25421.443266.488125@meta.inria.fr>
> 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.

There is an '@charset' declaration. If you use it, it has to be the
very first thing in the file:

    @charset "iso-8859-1";

See section 4.4 of CSS2

I don't know whether any browsers implement it yet.


Bert
-- 
  Bert Bos                                ( W 3 C ) http://www.w3.org/
  http://www.w3.org/people/bos/                              W3C/INRIA
  bert@w3.org                             2004 Rt des Lucioles / BP 93
  +33 (0)4 92 38 76 92            06902 Sophia Antipolis Cedex, France
Received on Tuesday, 7 November 2000 01:29:48 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 2 June 2009 19:16:55 GMT