Closed Bug 282882 Opened 20 years ago Closed 20 years ago

Unicode (16-bit fixed length) files won't load <link>ed stylesheets

Categories

(Core :: CSS Parsing and Computation, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: henrik.pauli, Unassigned)

Details

(Keywords: intl)

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20050212 Firefox/1.0
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20050212 Firefox/1.0

If the HTML file is in a NUL-padded Unicode format (pretty much everything
except UTF-8), the CSS -- for example -- won't be loaded from a link element. 
Once I convert it to UTF-8 or something outdated, it works.

I suspect something odd with the interpretation of the href's value (NULs
confusing strings? not unlikely!)

Reproducible: Always

Steps to Reproduce:
What's the character encoding of an external style sheet? Is it in UTF-16 as
well or in another encoding? If it's not the same as that of the refering html
file (in this case, UTF-16), you have to specify its character encoding at the
very beginning: (actually, it's always a good idea to specify the encoding at
the beginning of a CSS file) 

@charset="xyz";

(see http://www.w3.org/International/tutorials/tutorial-char-enc/ )

Please, give us the url of a test case. 

It's either dupe, invalid (or has fixed since 1.0 shipped)
Component: Layout → Style System (CSS)
Keywords: intl
(In reply to comment #1)

> @charset="xyz";

I meant ( "=" shouldn't be there) 

  @charset "utf-8";
  @charset "iso-8859-1";
  @charset "utf-16le"; 

Oops! Indeed, indeed.

The CSS was in a legacy encoding.

Thanks for that @charset thing, I'll keep it in mind (interesting how I've never
encountered it before even though I'm nowhere new to CSS, learnt it from the W3C
docs and am a big language nut who likes Unicode quite a bit...)
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.