Forum Moderators: open
However, in expanding my horizons I've hit a block with validating HTML. The W3C validator kicks back:
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.
I haven't a clue what to do. I write all my code on notepad. Is there a default for this sort of thing?
How do I find out what the encoding is?
Should I have a preference?
Yes, that is what I use on my main site.
I am assuming that the normal way for a web server to inform the client of the encoding is through HTTP header, not HTML. I am assuming that the META HTTP-EQUIV is a poor man's attempt to mimick that behaviour if he cannot directly control the HTTP header.
Just did a test with Brett's Server Header Check [webmasterworld.com].
On my main site (using .htaccess) I get:
Content-Type: text/html; charset=iso-8859-1
On my Geocities toy site (using meta) I get:
Content-Type: text/html
While posting in one window I was checking w3.org in another, they state it all explicitly in 5.2.2 Specifying the character encoding [w3.org].
.htaccess files (or "distributed configuration files") provide a way to make configuration changes on a per-directory basis. A file, containing one or more configuration directives, is placed in a particular document directory, and the directives apply to that directory, and all subdirectories thereof.
Please note the "and all subdirectories thereof".