On 24/07/10 10:55, Nikolai Weibull wrote:
On Sat, Jul 24, 2010 at 05:06, Tony Mechelynck
<[email protected]>  wrote:
On 23/07/10 20:06, Nikolai Weibull wrote:

<meta/>    may actually appear anywhere in the document, if places is
referring to HTML processors (which of course don’t have to respect
it).

<meta>  in an HTML document MUST be in the<head>  part, which MUST be before
the<body>  part — IOW, pretty near the top. In addition, the description of
the<meta http-equiv="Content-Type">  tag, which is where the charset may
appear, says that it SHOULD be as near the top as possible; in practice,
that would mean immediately after the<head>  opening tag.

MUST, when it comes to processing HTML, is a very loose requirement.

How near the top would you say it comes in the following document?

<html>
   <head>
     <title>…</title>
     <link …/>
     <link …/>
     <meta …/>
   </head>
   <body/>

This ^ is not valid HTML: paired tags must always be paired in HTML, even when empty (unlike in XML), so it should be <body></body>; but anyway, an html document with an empty <body> is far from typical by my standards. and

<!DOCTYPE...
<html><head><meta http-equiv="Content-Type" ... >
<title>...</title>
<link ...><link ...></head>
<body></body></html>

would be better according to what the W3C says about the position of the Content-Type <meta> element. "As near the top as possible": how could that have eluded you?
        

</html>

Oops, nearer the end.  You’re missing the point.

'fileencoding' shouldn't be set by a modeline because the modeline will set
the encoding-for-writing after (possibly) getting the encoding-for-reading
wrong, so you wouldn't even know if you've _got_ it wrong.

My suggestion was that 'fileencoding' would, if found in a modeline
while trying to determine the input encoding, be used as a hint.  I
don’t see how this could have eluded you.


Best regards,
Tony.
--
Kansas state law requires pedestrians crossing the highways at night to
wear tail lights.

--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Raspunde prin e-mail lui