On 30/08/10 04:51, Benjamin Fritz wrote:
On Sat, Aug 28, 2010 at 10:00 PM, Tony Mechelynck
<[email protected]>  wrote:

I don't know what is being done ATM, but I'd always include the line

<meta http-equiv="Content-Type" content="text/html; charset=whatever" />

(replacing "whatever" by the charset name) somewhere near the start of the
<head>  element. You may want to use a synonym, e.g. iso-8859-1 for Latin1,
but that's just the finishing touch.


Yes, that's mostly what it does now, except it omits the line if it
could not determine the charset, always uses 'encoding' instead of
'fileencoding', and specifies the encoding in the<?xml line instead
when optionally using xhtml. I think using utf-8 as a fallback instead
of leaving it out entirely would be a better idea.

The user can specify the charset now, but then the fileencoding will
be wrong unless the user remembers to manually set it (or if it gets
inherited...'fileencoding' seems to act like a "global-local" option).


Well, for existing files, 'fileencoding' will be set locally by the 'fileencodings' (plural) heuristic if the latter option is set. For new files, you can :setg fenc=something and it will be used when creating a new file.

If 'fileencoding' (singular) is the empty string for a file (which is the default for new files) you'll inherit the value of 'encoding'.


Best regards,
Tony.
--
Said a swinging young chick named Lyth
Whose virtue was largely a myth,
        "Try as hard as I can,
        I can't find a man
That it's fun to be virtuous with."

--
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