• Register
0 votes
474 views

Problem :

I am very confused about an error message I'm getting when I try to validate any simple HTML document without the meta encoding like this:

<!DOCTYPE html>

<html>

<head>

<title>MyTest</title>

</head>

<body>MyTest</body>

</html>

The W3C validator http://validator.w3.org reluctantly accepts a document as valid with just a few warnings when it is pasted into a direct input form, but when the document is uploaded or loaded by the URI, validation fails with below error message

The character encoding was not declared. Proceeding using windows-1252.

There are two things I don't understand about above error:

· Why is the missing character encoding considered an error, when fallback rules exist?

· Why is a validator assuming windows-1252 instead of UTF-8, like any browser would?

Can someone explain me these two points please? I am pretty new to this stuff, so please bear with me.

7 5 2
3,870 points

1 Answer

0 votes

Solution :

Well that depends on what you are using.

· if you are using a File Upload option, it depends on which encoding the HTML file was saved with.

· if you are using a Direct Input option, it depends on the navigator.

If you don't want a validator to guess, and use UTF-8, you can add the following line

<meta charset="UTF-8">

inside a  head element.

Hope it solves your issue.

9 7 4
38,600 points

Related questions

0 votes
1 answer 351 views
351 views
Problem : I was hoping that someone may know how to resolve the below HTML5 validation error. When I try to validate my page it gives me a below error : Error Line 90, Column 63: An body start tag seen but an element of the same type was already open. <body class=" ... only find the one <body> (the one referenced by above error) and one </body>. Can anyone please tell me how to fix above error?
asked Jan 25 jwilliam 3.9k points
1 vote
1 answer 135 views
135 views
Problem : I am new to Google Maps. Currently I am trying to create the page that should be able to generate the dynamic numbers of Google Map. But my newly created webpage always shows me below message: Geocode was not successful for the following reason: ... re confirmed that my Geocoding API and Javascript API are also enabled. I am looking for the expert help on my Google Maps issue.
asked Apr 17 stewart 4k points
0 votes
1 answer 49 views
49 views
Problem : I am beginner to html. I have recently started learning html. When I tried to process my web page in a W3C validator it started showing me below error &ldquo;Start tag head seen but an element of the same type was already open&rdquo;. But when I try to remove the ... I re add a start tag then the error comes back again. How can I fix this issue? Can anybody help me in fixing this issue?
asked Mar 6 mphil 2.3k points
1 vote
1 answer 21 views
21 views
Problem: I simply want to know what is the Scope of variables in c++, and why the program throws back errors like, &ldquo;c++ was not declared in this scope&rdquo;? Please keep your words as simple as possible. Thanks.
asked Mar 10 Gavin 15.3k points
0 votes
1 answer 252 views
252 views
Problem : I am unable to solve my link problem. Can anybody help on to this to link the CSS and JS File? I am facing below error : Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:8080/RetailSmart/jsp/ ... .js Failed to load resource: the server responded with a status of 404 (Not Found) http://localhost:8080/RetailSmart/jsp/Jquery/prettify.js
asked Jan 10 alecxe 7.5k points