On Sat, Jul 9, 2011 at 1:17 PM, Tony Mechelynck
<[email protected]> wrote:
>
> cp1251 is an 8-bit encoding, and as such it cannot give an "error" signal 
> when trying to open a file with it. In 8-bit encodings, there are no invalid 
> bytes. This means that anything after the first 8-bit encoding in 
> 'fileencodings' will never be tried. For instance, if you have
>
>        :set fencs=ucs-bom,utf-8,cp1251,iso-8859-15,latin1,shift-jis
>
> thelast three (including shift-jis which is a multibyte encoding) will never 
> be tried.

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.

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

Reply via email to