473,320 Members | 2,189 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Validation error

Ray
I've got a couple of webpages that I am trying to validate but I get this
error message when trying to validate them with the www.w3.org HTML
validator:
I was not able to extract a character encoding labeling from any of the
valid sources for such information. Without encoding information it is
impossible to validate the document. The sources I tried are:

a.. The HTTP Content-Type field.
b.. The XML Declaration.
c.. The HTML "META" element.
And I even tried to autodetect it using the algorithm defined in Appendix F
of the XML 1.0 Recommendation.

Since none of these sources yielded any usable information, I will not be
able to validate this document. Sorry. Please make sure you specify the
character encoding in use.

What am I doing wrong? They are just simple html files typed up in Notepad.
Why can't it detect them? I have tried validating both the uploaded version
and the local version and I get the same error both ways.

Ray
Jul 20 '05 #1
4 1749
Ray wrote:
I was not able to extract a character encoding labeling from any of the
valid sources for such information. Without encoding information it is
impossible to validate the document. The sources I tried are:

a.. The HTTP Content-Type field.
b.. The XML Declaration.
c.. The HTML "META" element.
And I even tried to autodetect it using the algorithm defined in Appendix
F of the XML 1.0 Recommendation. Why can't it detect them?


I would imagine that it is becuase the content type field in the http
header, XML declaration and <meta> data don't tell the validator what
character set to try.

http://www.htmlhelp.com/tools/validator/charset.html

--
David Dorward <http://dorward.me.uk/>
Jul 20 '05 #2
"Ray" <he*********@myway.com> wrote:
I've got a couple of webpages that I am trying to validate but I get this
error message when trying to validate them with the www.w3.org HTML
validator:
I was not able to extract a character encoding labeling from any of the
valid sources for such information. Without encoding information it is
impossible to validate the document. The sources I tried are:

a.. The HTTP Content-Type field.
b.. The XML Declaration.
c.. The HTML "META" element.
And I even tried to autodetect it using the algorithm defined in Appendix F
of the XML 1.0 Recommendation.

Since none of these sources yielded any usable information, I will not be
able to validate this document. Sorry. Please make sure you specify the
character encoding in use.

What am I doing wrong?
You're not telling the validator (or any other user agent - such as
your visitors' browsers) what the character encoding used by your
pages is. That information is needed to validate the page (it's also
needed to render the page, but browsers have defaults/make guesses).
They are just simple html files typed up in Notepad.
Why can't it detect them?
It's detecting your pages just fine. It just can't validate them
without a bit more information.

You can provide this information in one of three ways, as the error
message says:
a.. The HTTP Content-Type field.
This is done by configuring your server. If at all possible this is
the preferred method.
b.. The XML Declaration.
This only applies to XHTML, goes before the doctype declaration right
at the start of your code and takes this form:
<?xml version="1.0" encoding="ISO-8859-1"?>
Replacing ISO-8859-1 with whatever character encoding you are using.
Note that including this declaration will cause IE to enter Quirks
mode regardless of the doctype, and thus this is often best avoided.
c.. The HTML "META" element.


The least preferred method, include the following in the head of your
page:
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
Again, replacing ISO-8859-1 with whatever character encoding you are
using.

If you are validating pages that will later move to a server which
sends out proper character encoding information then you can
temporarily emplouy and over ride by using teh validator's extended
interface: http://validator.w3.org/detailed.html and choosing your
encoding from the menu provided.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 20 '05 #3
On Fri, 20 Feb 2004 11:51:14 -0600, Ray <he*********@myway.com> wrote:
I've got a couple of webpages that I am trying to validate but I get
this
error message when trying to validate them with the www.w3.org HTML
validator:
I was not able to extract a character encoding labeling from any of the
valid sources for such information. Without encoding information it is
impossible to validate the document. The sources I tried are:

a.. The HTTP Content-Type field.
b.. The XML Declaration.
c.. The HTML "META" element.
And I even tried to autodetect it using the algorithm defined in
Appendix F
of the XML 1.0 Recommendation.

Frustrating, isn't it? The other respondants are right on, but I'll add
that if you go to http://validator.w3.org/file-upload.html you can upload
files and specify the charset without including it in the HTML.
(http://validator.w3.org/detailed.html allows this option with uploaded
files.)
Jul 20 '05 #4
"Ray" <he*********@myway.com> wrote in message
news:10*************@corp.supernews.com...
I've got a couple of webpages that I am trying to validate but I get this error message when trying to validate them with the www.w3.org HTML
validator: <trimmed>
What am I doing wrong? They are just simple html files typed up in Notepad. Why can't it detect them? I have tried validating both the uploaded version and the local version and I get the same error both ways.


Hi Ray. Here's an analogy to your post: "Dear All, My doctor has said
I'm ill and has given me a prescription (enclosed), but I want a second
opinion, so what's wrong with me? Thanks. Bye." In other words we'll
need to see the patient - a link to the uploaded version of your
webpage! :o)

However, looking at the "prescription" your webpage has no associated
'meta' information describing what the content is, so check to see if
your webserver is setting a content-type as a header, or add a meta tag
to the <head> section of the page, possibly something like: <meta
http-equiv="content-type" content="text/html" /> if it's HTML or ending
/> instead of > if it's XHTML.
--
Andrew Urquhart
Reply: http://www.andrewu.co.uk/about/conta...ewsgroup_ciwah
Jul 20 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Shone | last post by:
I would like to perform a 2-pass XML reading from a stream. Once using the Validating reader, just to confirm the validity against the schema, and next time to do a reading to extract the data....
2
by: Doslil | last post by:
I am trying to validate the fields in my database.I have already validated the fields to check for not null.Here is what I have written for Numeric and text field. Private Function EENUM() On...
3
by: Rob Meade | last post by:
Hi all, I have a login page which has username and password fields, a login button, and 2 validation controls (one for each field) - currently I have controls to display to the summary if the...
14
by: Matt | last post by:
I want to know if ASP.NET Web Forms Validation Controls are Server-Side or Client-Side form validation? Since I think each validator control can select either 1) JavaScript based error dialog or 2)...
2
by: Martyn Fewtrell | last post by:
Dear All I have a Windows 2003 Server with IIS6 where the validation controls on ASP.Net pages no longer work. I believe it to be specific to the server as if I create an ASP.Net page on the...
12
by: Nalaka | last post by:
Hi, I suddenly started getting a lot of errors from html validation (some CSS) so I followed the following instructions to disable it. If you'd rather not have these types of HTML validation...
9
by: julie.siebel | last post by:
Hello all! As embarrassing as it is to admit this, I've been designing db driven websites using javascript and vbscript for about 6-7 years now, and I am *horrible* at form validation. To be...
11
by: Rik | last post by:
Hello guys, now that I'm that I'm working on my first major 'open' forms (with uncontrolled users I mean, not a secure backend-interface), I'd like to add a lot of possibilities to check wether...
3
by: teo | last post by:
Mozilla error on postback and validation ----------- A Button causes a Listbox to desappear. If no item has been selected on the Listbox, all is OK. If one or more items are selected,
7
ak1dnar
by: ak1dnar | last post by:
Hi, I got this scripts from this URL There is Error when i submit the form. Line: 54 Error: 'document.getElementbyID(....)' is null or not an object What is this error. Complete Files
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.