On Tue, Feb 1, 2011 at 7:11 PM, Rhialto <[email protected]> wrote:
> On Tue 01 Feb 2011 at 09:30:48 -0800, Ben Fritz wrote:
>> Converting from cp1252 to latin1 should fail depending on the
>> characters in the file, but latin1 to cp1252 should always work,
>> shouldn't it? I understand cp1252 to be a superset of latin1. Is it
>> because the system mis-represents its encoding to Vim as latin1 when
>> really it is cp1252 or something?
>
> If this means that I get cp1252 characters in my file which I tried to
> keep pure Latin 1, this is very wrong... my system doesn't display those
> obnoxious microsoft "extensions".
>

For now, if this bothers you, you can set your encoding to something
other than latin1 (like utf-8) and do a setglobal fenc=latin1. Also
update your fileencodings option so that latin1 actually gets
detected.

Now you will get a warning if you try to save a file and there are
non-latin1 characters in it.

I think it is a problem that with encoding=latin1, Vim acts
differently and you will not get a warning for non-latin1 characters.
But apparently a very common (and probably not very serious) problem.

cp1252 is basically the same as latin1, with a few extras thrown in
where latin1 doesn't have anything useful. So as long as you don't
intentionally include any non-latin1 characters, your file will be
identical to one saved as a strict latin1 file.

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