css sent whith charset ascii not applied

RESOLVED DUPLICATE of bug 234502

Status

()

RESOLVED DUPLICATE of bug 234502
12 years ago
12 years ago

People

(Reporter: remi.pauchet, Unassigned)

Tracking

({testcase})

Trunk
testcase
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

12 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4

I have a html page (charset utf8 sent in the header Content-type), with a link to a css stylesheet (charset ascii sent in the heade Content-type).

The stylesheet is downloaded but not applied to the html page.

If I change the server header for the css to charset utf8, the css is applied

Reproducible: Always

Steps to Reproduce:
1. load the test url provided
Actual Results:  
"CSS is not loaded." is displayed


Expected Results:  
According to the css stylesheet, it should be hidden (display: none)

You can verify the same url with opera or IE, it displays "CSS is loaded."

firebug shows that the css is downloaded from the server but the rules are not applied to the html page.

I tested the following :

HTML charset header CSS charset header Result
ascii               ascii              Work.
utf-8               utf-8              Work.
utf-8               iso-8859-1         Work.
utf-8               ascii              Don't work

Updated

12 years ago
Component: General → Style System (CSS)
Keywords: testcase
Product: Firefox → Core
QA Contact: general → style-system
Version: unspecified → 1.8 Branch

Comment 1

12 years ago
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9a5pre) Gecko/20070531 Minefield/3.0a5pre

Seeing this on Linux trunk, too.
Status: UNCONFIRMED → NEW
Ever confirmed: true
OS: Windows XP → All
Hardware: PC → All
Version: 1.8 Branch → Trunk
"ascii" is not a valid charset name; the correct name is "us-ascii".  We treat is as an unknown charset in the CSSLoader and bail out because we can't decode the data.  I have no idea what's going in in the case when you send both the page and the CSS with the bogus charset; I'd have to look at a testcase to tell what's going on there.

In any case, as filed this is a duplicate.
Status: NEW → RESOLVED
Last Resolved: 12 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 234502

Comment 3

12 years ago
But "ascii" is a valid alias for "us-ascii". Bug 383018 added this alias to the list that Mozilla uses to resolve charset aliases, so the testcase should work now (in builds that have the patch in them).
Yep.  With that change, this testcase should work.
You need to log in before you can comment on or make changes to this bug.