On 26/08/10 16:53, Ben Fritz wrote:


On Aug 26, 9:40 am, Ben Fritz<fritzophre...@gmail.com>  wrote:

 From my understanding, 'fileencoding' is the encoding Vim is supposed
to use to read/write the file. So, it does make sense that we should
use this instead of just 'encoding' for the charset of the generated
html. Does anyone know why TOhtml has used 'encoding' instead?


One problem with the supplied patch, is that Vim will use 'encoding'
for a file's encoding, if 'fileencoding' is empty. In my setup, it
looks like 'fileencoding' is nearly always empty.

So, the script will need to fall back to 'encoding' if 'fileencoding'
is empty. Probably it should also re-detect the charset using
'encoding' when 'fileencoding' is not blank but does not resolve to a
valid charset.

Any thoughts? Like I said, I've never needed to mess with 'encoding'
or 'fileencoding' in my daily use of Vim.


If 'fileencoding' is empty (buffer-locally), Vim will save the file with 'encoding'. This is documented behaviour.

For details, see http://vim.wikia.org/wiki/Working_with_Unicode and the help topics listed there.


Best regards,
Tony.
--
Meeting, n.:
        An assembly of people coming together to decide what person or
department not represented in the room must solve a problem.

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