This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 23684 - charset attribute of <link rel=stylesheet> is still used in implementations
Summary: charset attribute of <link rel=stylesheet> is still used in implementations
Status: RESOLVED FIXED
Alias: None
Product: WHATWG
Classification: Unclassified
Component: HTML (show other bugs)
Version: unspecified
Hardware: All All
: P2 normal
Target Milestone: Unsorted
Assignee: Ian 'Hixie' Hickson
QA Contact: contributor
URL:
Whiteboard: CSSOM
Keywords:
Depends on: 14703
Blocks:
  Show dependency treegraph
 
Reported: 2013-10-30 19:19 UTC by Simon Sapin
Modified: 2014-01-13 23:13 UTC (History)
2 users (show)

See Also:


Attachments

Description Simon Sapin 2013-10-30 19:19:17 UTC
The charset attribute of the link element is marked as obsolete, but in practice implementations do use it to determine the encoding of a stylesheet.

See also https://www.w3.org/Bugs/Public/show_bug.cgi?id=14703#c20 about defining in the HTML spec how that attribute and the encoding of the document participate in determining the encoding of a stylesheet.


Test case:

data:text/html;charset=latin2,<link%20rel=stylesheet%20href=http://test.csswg.org/suites/css2.1/20110323/html4/support/none.css><span%20class=&%23258;&%23733;&%23258;&%23164;&%23258;&%23168>Test

(The above misinterprets a stylesheet as ISO-8859-2, with a class name 
set to the corresponding mojibake. Green means that the HTML document’s 
encoding is used for CSS.)
Comment 1 contributor 2014-01-13 23:13:08 UTC
Checked in as WHATWG revision r8391.
Check-in comment: Define how <link charset> works.
http://html5.org/tools/web-apps-tracker?from=8390&to=8391