The attached patch against the latest 7.3.3 changeset in Mercurial adds the requested use of 'fencoding' instead of 'encoding' when it is set to determine the HTML charset.
Additionally, it will now support a lot more encodings, and automatically set the file encoding of the new file to match the charset. All encodings that are both native to Vim (listed by name in :help encoding-names) and appear in the IANA registry ( http://www.iana.org/assignments/character-sets ) are supported. Note that not all of these encodings are supported by major web browsers or the w3c validator. New options are provided to override specific encodings in the charset detection, or there is still g:html_use_encoding to override all automatic detection. It is probably a good idea to use this option if publishing to a web page. There may be some charsets that previously were automatically detected that no longer are, and there are some encodings supported by Vim which I could not find in the IANA registry. Unfortunately, I could not find a list of widely supported charsets, so I just used all the ones in Vim and the IANA registry, as mentioned previously. If there is such a list, would it be a good idea to limit the automatically detected charsets to those in the list? Along those lines, it could be a good idea to automatically use UTF-8 in place of UTF-16 and UTF-32. Currently these charsets are selected as-is. So, consider this a beta release. PLEASE test and comment, I expect some changes may be needed before final submission. Patch is attached, or the files are available for download at the site I use for the TOhtml test suite: http://code.google.com/p/vim-2html-test/downloads/list -- 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
2html_encoding.patch
Description: Binary data
