On 13/08/07, Benno Schulenberg <[EMAIL PROTECTED]> wrote:
> Mick wrote:
> >  - My /etc/vim/vimrc says scriptencoding utf-8, does this mean
> > that this is the vim encoding and any new file will be saved with
> > this encoding?
>
> No, scriptencoding is just the encoding of /etc/vim/vimrc.  File
> encoding is handled by 'fileencodings' further down.
>
> >  - If I open a file which was saved with ISO-8859-1, edit it and
> > save it, will it keep the original encoding?
>
> Yes.  Vim will never change the encoding of a file.  If you typed
> characters that don't fit in ISO-8859-1 (which can happen if you use
> a utf locale), you will get a CONVERSION ERROR upon writing the
> file, and 'quit' will refuse to quit without you forcing it.

Hmm, I just checked a utf-8 file after I edited it and it says:

:set encoding
 encoding=latin1

I assume this means that it was changed from utf8 to latin1 (what ever
this is . . . is it relevant to ISO-8859-1?)

> >  - The vimrc says: " Make sure we have a sane fallback for
> > encoding detection set fileencodings+=default"  I guess this is
> > system default.  How can I find what is the default setting?
>
> Open a new file and type ":set enc"; it will show the current
> (default) enconding.  This default is what LANG says.  See the
> output of 'locale'.

The output of locale gives me:
===========================
$ locale
LANG=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=
===========================

Not sure I understand what all this means.  Is my Vim installation
working as it should? Do I have to change my locale?
-- 
Regards,
Mick
-- 
[EMAIL PROTECTED] mailing list

Reply via email to