On 16/07/11 22:08, Tony Mechelynck wrote:
On 10/07/11 18:43, Benjamin Fritz wrote:
Not 100% true. I don't know if it's documented, but if your system
does not recognize cp1251 for some reason, Vim seems through
experimentation to move on to the next. I learned this by accident on
a poorly configured server at work, which understands neither "cp1252"
nor "8bit-cp1252". So, my fencs now ends in ...,cp1252,latin1. On
Windows, most files load in cp1252. On the server, they load in
latin1.
[...]
The documentation is there, but maybe it's so obvious that you missed it:
*'fileencodings'* *'fencs'*
'fileencodings' 'fencs' string (default: "ucs-bom",
"ucs-bom,utf-8,default,latin1" when
'encoding' is set to a Unicode value)
global
{only available when compiled with the |+multi_byte|
feature}
{not in Vi}
This is a list of character encodings considered when starting to edit
an existing file. When a file is read, Vim tries to use the first
mentioned character encoding. If an error is detected, the next one
---------------------------------------^^^^^^^^^^^^^^^^^^^^^^^
in the list is tried. When an encoding is found that works,
'fileencoding' is set to it. If all fail, 'fileencoding' is set to
an empty string, which means the value of 'encoding' is used.
One possible error is "invalid encoding name".
Best regards,
Tony.
--
"Deep" is a word like "theory" or "semantic" -- it implies all sorts of
marvelous things. It's one thing to be able to say "I've got a
theory", quite another to say "I've got a semantic theory", but, ah,
those who can claim "I've got a deep semantic theory", they are truly
blessed.
-- Randy Davis
--
You received this message from the "vim_use" 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