W3C home > Mailing lists > Public > www-validator-css@w3.org > June 2007


From: Douglas Perreault <doug@perreault.us>
Date: Wed, 27 Jun 2007 10:56:23 -0400
To: "'olivier Thereaux'" <ot@w3.org>, "'Jan Eliasen'" <jan@eliasen.dk>
Cc: <www-validator-css@w3.org>
Message-ID: <00fe01c7b8cb$558722e0$009568a0$@us>


I believe Andreas does not understand our plight. I, and I assume Jan, would
love to create the CSS file without the UTF-8 BOM. It just does not seem
possible. As Andreas notes, the BOM on a UTF-8 file is pointless. But that
doesn't mean we can create the CSS without it.

A while back, maybe a year or two ago, a Windows Server security update /
hotfix changed our server so that files were suddenly defaulting to UTF-8
instead of the previous Windows default of ISO-8859-1. This caused all kinds
of problems and we searched in vain for a way to change it back. I found
nothing that would allow me to change our server back to its previous

Resigning myself to the fact that we were forced to use UTF-8, we went
through all of the web pages for all the websites we host and changed the
character sets to UTF-8 where they were declared in the HTML. This fixed
most of our problems as far as displaying web pages goes.

What remains a problem is the CSS validator.

When I save a CSS file to the server, it gets saved with a BOM. I don't seem
to have a choice in that matter. I have saved the file on my own computer
and verified the BOM is not present. However, when the file is copied to the
website on the server, the BOM is added. I have no choice. I wish I did and
Andreas can argue all day long that having the BOM there is pointless. I
know that but I can't remove it (well, *I* can, considering I have admin
access to the web server, but none of our customers would be able to do
this). Note that Microsoft IIS does not use .htaccess files.

So, the BOM is added, the file is marked as UTF-8, and there's nothing I can
do about it as far as I can tell.

I would prefer that the CSS file be transferred to the web server as a
simple ASCII, non UTF-8, file with no BOM. If you know how I can do that,
I'd welcome the suggestion.

In the meantime, here is a sample file exhibiting the problem:

Run that through the validator and you will get a parse error.

Take that same CSS file, but re-arrange it, and I get a "valid" CSS file,
though the "p" tag still shows the square boxes from the BOM. See
http://dev.inbliss.info/UTF1.css as an example.

The only difference between those two files is that an @media section
doesn't start off the CSS file that validates.


-----Original Message-----
From: www-validator-css-request@w3.org
[mailto:www-validator-css-request@w3.org] On Behalf Of olivier Thereaux
Sent: Tuesday, June 26, 2007 9:52 PM
To: Jan Eliasen
Cc: www-validator-css@w3.org
Subject: Re: BOM

Hi Jan, Andreas, all

On Jun 27, 2007, at 02:38 , Jan Eliasen wrote:
> When you say that I should define the charset for my css files, you  
> are
> tallking about doing it in the html, right? Like this:
> <link href="eliasen.eu.css" rel="stylesheet" type="text/css"  
> charset="utf-8"
> />

I think Andreas was suggesting setting it up on the server-side, so  
that the server declares your CSS as Content-Type: text/ 

> Why not use a BOM with utf-8? It is perfectly legal, as I  
> understand it, and
> it even helps the programs that must read the data to know it is utf-8
> encoded.

There's always controversy when it comes to using, or not, the BOM.
Last long thread I recall on the topic is

That said, I *think* that most of the issues between the CSS  
validator and documents with BOM were fixed in the past, did you  
experience any big trouble with one, and if so, is it online and can  
we use it as a test case?

Received on Wednesday, 27 June 2007 14:57:05 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:40:43 UTC