On 24/03/09 09:31, Tintin72 wrote:
>
> Hi,
>
> Under Ubuntu the default Vim encoding is utf-8 but I want to work in
> latin-1.
> So I put in my vimrc:
>
> set encoding=latin-1
>
> (I don't know if it's the good way to proceed)
>
> It seems to work but now some of the internal messages of Vim has
> strange symbols in place of the accentued characters.
>
> How could I fix this ?
> (What is the file containing the internal messages of Vim ?)
>
> Thanks.
I recommend leaving 'encoding' at UTF-8 if you're blessed with a system
which uses it as its default.
If you want new files to be created in Latin1 encoding unless you
explicitly tell Vim not to, use
setglobal fileencoding=latin1
The only problem with that is that you'll be able to type non-Latin1
characters such as the Euro sign € or the French OE and oe ligatures Œ
œ, the error will only become apparent when you try to write the file.
You can still deviate from Latin1 for some particular file then, by
creating it with e.g.
e filename.ext
setlocal fileencoding=utf-16le bomb
You may want to keep a more general 'fileencodings' (plural) value than
just Latin1, maybe
set fileencodings=ucs-bom,utf-8,latin1
so that you'll be able to edit most existing Unicode files (if you have
any, now or in the future) with no problems. (Latin1 must be last,
because anything after it will never be used.)
See http://vim.wikia.org/wiki/Working_with_Unicode about an explanation
of what the various '...encoding' options are for, and where to find
still more info about them.
Best regards,
Tony.
--
Beware of low-flying butterflies.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---