• Register
0 votes
959 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

Please log in or register to answer this question.

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 501 views
501 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, 2020 jwilliam 3.9k points
1 vote
1 answer 280 views
280 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, 2020 stewart 4k points
0 votes
1 answer 35 views
35 views
Problem: I am working on functions in C++. I am facing the above mentioned error while I am trying to run the following program: #include <iostream> using namespace std; int main() { cout<<func(4); } int func(int number) { return number; } I have no idea about the error. Why this error is being triggered and how can I resolve this issue?
asked Nov 10, 2020 Code Learner 5.5k points
0 votes
1 answer 96 views
96 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, 2020 mphil 2.3k points
0 votes
1 answer 17 views
17 views
Problem Hey, I Am trying to convert the string to an array by using stoi. But it&rsquo;s showing an error &lsquo;stoi&rsquo; was not declared in the scope. I have a standard library and a string as well. Can somebody help me to correct the code that i have been given in the next ... init; string hours0 = init.substr(0,2); int hours = stoi(hours0); cout << hours << endl; system("pause"); return 0;
asked Dec 24, 2020 chris jordan 2.2k points
0 votes
1 answer 6 views
6 views
Problem: I'm just learning c++ (first day looking at it since I took a 1 week summer camp years ago) I was converting a program I'm working on in Java to C++: The errors were: SkewNormal.h: In function 'double getSkewNormal(double, double)' : SkewNormal. ... SkewNormal.h: In function 'double integrate(double, double, int, Evaluatable)': SkewNormal.h:41: error: 'sum' was not declared in this scope
asked Dec 15, 2020 Mashhoodch 5.6k points
1 vote
1 answer 39 views
39 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, 2020 Gavin 15.3k points
0 votes
1 answer 19 views
19 views
I need to do the following page layout and I do not know how to do it right. I need to divide page into header left pane and right pane. The right pane in its turn, I need to divide into 2 sections. Something like that: Header Pane 1 Pane2 ... my understanding this is not a best practice to use tables for page layout. Just one more detail: I am targeting modern browsers, especially chrome.
asked Nov 26, 2020 alexh 2.2k points
0 votes
1 answer 17 views
17 views
Problem: I am trying to send mail to gmail address but it keeps getting this error "SMTP -> ERROR: Failed to connect to server: connection timeout (110) SMTP Connect () failed. Message was not sent. Sender error: SMTP Connect () error . " What could be the problem? require ' ... { echo 'Message was not sent.'; echo 'Mailer error: ' . $mail->ErrorInfo; } else { echo 'Message has been sent.'; }
asked Nov 12, 2020 sasha 5.3k points
0 votes
2 answers 1.3K views
1.3K views
Problem : I have the RScript file (let's call it main.r) which has the reference to another file, using the following code: source("functions.R") But, when i run a RScript file, it complains with the following error: Error in file(filename, "r", encoding = encoding) ... next to the functions.R in a same directory. I can call a functions.R in a RMd (RMarkdown) file which exist in a same directory
asked Jan 17, 2020 jwilliam 3.9k points