W3C home > Mailing lists > Public > www-validator@w3.org > December 2006

Re: Different results between Upload and Direct input

From: olivier Thereaux <ot@w3.org>
Date: Fri, 8 Dec 2006 17:37:57 +0900
Message-Id: <9E83AB3D-0987-4592-9BCC-785C4FB3E4BF@w3.org>
Cc: www-validator@w3.org
To: Frank Klaver <frankklvr@mac.com>

Dear Frank,

On Dec 8, 2006, at 04:16 , Frank Klaver wrote:

> When using Direct Input for validation I get a This Page Is Valid  
> HTML 4.01 Transitional!
> With the same document using validate by upload it correctly gives  
> me Tentatively and  No Character Encoding Found! Falling back to  
> UTF-8.

Explanation: the validator (and indeed anything that will read your  
document, e.g a browser or a search engine) will need to know what  
encoding it is in, in order to read it. In the case of "direct input"  
the validator knows that you have pasted the text of your markup in  
an utf-8 form, so the content should be in utf-8.

Using file upload however, if there is no declaration of encoding in  
the document itself, the validator can only "fall back" to a default  
encoding and try reading your document with it. In your case, the  
result was positive.

Further reading:

Solution: your document is not broken, but you could add this in the  
<head> of your document to make sure your document always declare its  
encoding, offline or online:
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" >

Received on Friday, 8 December 2006 08:38:08 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 14:17:50 UTC