On 10/07/11 18:43, Benjamin Fritz wrote:
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.


Hm, yes indeed, this would be an edge case. I haven't experienced it because with the exception of a "tiny build" Vim which I compile under the name "vi", mostly as a check against missing #ifdef's in the source, my Vim is a "Huge" build with +iconv which implies that all "standard" encodings are recognised. For cp1252 I would usually type ":e ++enc=Windows-1252 foobar.txt" (using the same code which I see in the Content-Type headers for email) — does your "work" system recognise that?


Best regards,
Tony.
--
The Official MBA Handbook on business cards:
        Avoid overly pretentious job titles such as "Lord of the Realm,
Defender of the Faith, Emperor of India" or "Director of Corporate
Planning."

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