Re: Character set validation

From: Nick Kew (nick@webthing.com)
Date: Sun, Mar 04 2001

  • Next message: Nick Kew: "Re: Article on Testing Web Apps"

    Date: Sun, 4 Mar 2001 23:55:08 +0000 (GMT)
    From: Nick Kew <nick@webthing.com>
    To: Kathleen Anderson <kathleen@spiderwebwoman.com>
    cc: www-validator@w3.org
    Message-ID: <Pine.BSF.4.21.0103042348300.1582-100000@fenris.webthing.com>
    Subject: Re: Character set validation
    
    
    OK, this charset problem has been reported by enough people to convince
    me there's a bug, and that it's probably not the same as the one I mention
    below.  So I'm going to repost my reply to Kathleen from ciwah.
    
    ======
    > Hi:
    > I was directed to this group by http://validator.w3.org/feedback.html
    > 
    > Does anyone know why this charset:  
    > 
    > <meta http-equiv="Content-Type" content="text/html;
    > charset=windows-1252">
    
    You also posted to the validator mailing list, which is probably the best
    place for this (I didn't respond there for reasons that should become
    apparent in a moment).
    
    Now there are two parts to this:
      (1) The construct you are using is fundamentally nonsense.
      (2) Nevertheless, it is perfectly valid, and what you describe appears
          to be a validator bug.
    I'd like to add a third a third part: I recollect fixing a bug in my
    own validator (Page Valet) that was triggered by a windows-1252 charset.
    Unfortunately I can't recollect enough about this to relate it to
    your report, which I'd like to do before replying to the list.
    
    Going back to the main points:
    (1) The construct <meta ...> is part of HTML.  Content-Type is an
    HTTP header.  If content-type is not text/html, then the document
    cannot be treated as HTML, and <meta ...> has no HTML meaning.
    If content-type is text/html, then it has already been declared by
    the server, and for a browser or other agent to use the <meta ...>
    in place of the HTTP header would be illegal.
    (2) In view of (1), the validator is wrong to take any notice at all
    of your charset declared in <meta ...>.  The fact that this is causing
    it to fall over is secondary.  All the validator should do here is
    check your syntax, which happens to be correct.
    
    Of course, without a URL, I cannot confirm anything, so this
    analysis is purely speculative.
    ====
    
    
    -- 
    Nick Kew
    
    Is your site a lawsuit waiting to happen?
    See <URL:http://valet.webthing.com/intranet/> before it's too late.