On Sep 30, 5:07 pm, Doris Wagner <[email protected]> wrote:
> hi list,
>
> I am using vim from the terminal (mac os 10.5); I often use german  
> umlauts;
>
> now, when I write the umlaut ö with another editor, in my case with  
> texshop, and open the file with vim, there ist no ö displayed, but
> <9a>;
> apparently, something with the encoding is wrong;

I'm not sure in which encoding ö would be <9a>. In latin1 it seems to
be <f6>. Do you know which encoding textshop uses?

> my .vimrc-settings are as in
>
> http://hoepfl.de/articles/2007/01/vimderbar.html
>
> recommended, that is:
>
> set encoding=utf-8
> set fileencoding=
> setglobal fileencoding=utf-8
> set fileencodings=ucs-bom,utf-8,latin1 set termencoding=latin1

Those settings are a bit misguided. First of all, 'termencoding'
should be infered from your locale settings. Since you seem to want to
work with utf-8, I suggest you change your terminal to use utf-8 too
(if it doesn't already.) :h 'termencoding' has an example on how to
use utf-8 even if system has no locale support for it.

In .vimrc, :set fileencoding and :setglobal fileencoding basically do
the same thing. Using both is not useful. Also, you only need to set
'fileencoding' explicitly when it differs from 'encoding'.

You shouldn't have to change 'fileencodings' at all.

So, provided that your locale really is 'latin1', this should suffice:

let &termencoding = &encoding
set encoding=utf-8

I would suggest, however, that you use an utf-8 locale, because then
you don't have to change encoding settings at all (as long as you work
with utf-8 files.)

Henrik.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Reply via email to