Forum Moderators: open
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:The HTTP Content-Type field.
The XML Declaration.
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.
I don't really understand it.
I don't really understand it.
For a conceptual discussion of the issues see the W3C discussion of HTML Document Representation [w3.org].
In addition to the http-equiv meta tag you can specify the charset in your .htaccess (assuming an apache server):
AddType 'text/html; charset=ISO-8859-1' html [added]Note that if you use the meta tag you must include it in every file, while a single .htaccess file will affect all files in that directory and its subdirectories![/added]
Doubt it could be a typo, that is what cut and paste avoids! Also check the WDG's validator hints at [htmlhelp.com...]
I do not understand much about apache, but believe that the server administrator somehow defines what parameters users can set with their own .htaccess files. You could get an authoritative answer to that question on the apache forum.
<added>
My solution is posted in this thread [webmasterworld.com].
html declaration should be the very first line of every page before your <html> and <head> tags and look like this.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> or similar and the character set should be inside the <head> tag and look like this.
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> or similar if your using a different character set.
I found that even though some of my pages were otherwise valid (according to html4.01) they would not validate unless these were both present.
If they are missing then the validator does not know if your page uses the Latin alphabet, or some other script like Greek, Thai, Chinese, Japanese or Arabic and so on, nor does it know if your code is HTML 3.2 or HTML 4.01, or XHTML, nor does it know if the page is a Frameset page or just a normal page of HTML content.
Those two lines are very important.