[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#349403: Acknowledgement (konqueror ignores the encodings in CSS stylesheets)

The CSS 2.1 specification gives in section 4.4 the following rules:

When a style sheet is embedded in another document, such as in the STYLE element or "style" attribute of HTML, the style sheet shares the character encoding of the whole document.

When a style sheet resides in a separate file, user agents must observe the following priorities when determining a style sheet's character encoding (from highest priority to lowest):

  1. An HTTP "charset" parameter in a "Content-Type" field (or similar parameters in other protocols)
  2. BOM and/or @charset (see below)
  3. <link charset=""> or other metadata from the linking mechanism (if any)
  4. charset of referring stylesheet or document (if any)
  5. Assume UTF-8
The following example reveals the problem
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet title="1" href="" type="text/css"?>
   <b>Test: À</b>


@charset "UTF-8";

a:before {
   display: block;
   content: "À";

a {
   display: block;
   color: #ccc;

b {
   display: block;


Reply to: