Bug 10155 - CSS2: @charset is not supported
Summary: CSS2: @charset is not supported
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: 419.x
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nobody
URL: http://amd.co.at/pat/webkit/
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-29 15:07 PDT by Patrik Weiskircher
Modified: 2006-09-01 12:31 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrik Weiskircher 2006-07-29 15:07:11 PDT
If you set the charset encoding of a external CSS file using either one of the following methods, it gets ignored:
@charset in the css file
Content-Type: text/css; charset=utf-8 or
Content-Encoding: utf-8

As soon as you specify the charset in the <link> itself, it works as expected.

Please see the above mentioned URL.
With nonworking.html, the <link> does not specify the charset, but test.css starts with '@charset "utf-8";' and the Content-Type is set to 'text/css; charset=utf-8'.
working.html references the same test.css, but specifies the charset in the <link>.
Comment 1 Alexey Proskuryakov 2006-07-30 00:00:57 PDT
Specifying a charset in Content-Type works in current WebKit, you can verify this with a nightly build from <http://nightly.webkit.org>.

Do any browsers honor a charset specified in the Content-Encoding header? The only registered options are gzip, compress, deflate and identity: <http://www.iana.org/assignments/http-parameters>.

Spec for @charset: <http://www.w3.org/TR/CSS21/syndata.html#x60>. Renaming the bug to track this single issue.
Comment 2 Alexey Proskuryakov 2006-09-01 12:31:07 PDT
Fixed in bug 5620, r16175.