[ldapvi] Passing encoding to vim
David Lichteblau
david at lichteblau.com
Fri Mar 23 09:52:48 CET 2007
Hi,
Quoting Ulrich Spoerlein (uspoerlein at gmail.com):
> What's happening? I run ldapvi in a plain xterm (latin1 encoding), the
> file itself is of course utf-8 encoded (fenc=utf-8) but the terminal
> in vim is set to utf-8 too (enc=utf-8).
okay, so the modeline ldapvi puts into the files, which sets
encoding=utf-8, affects not just the file's encoding, but also the
terminal encoding.
`encoding' is used because I could not find any other setting that
works. `fileencodings', for example, does not seem to have effect in
the modeline.
> What's the correct way, to have ldapvi pass the file-encoding only?
> The terminal-encoding should be untouched by it, IMHO.
What fixes the problem for me is to put this line into my .vimrc:
let &termencoding = &encoding
VIM will then correctly write the files in UTF-8 for ldapvi, but use
Latin-1 for the terminal.
d.
More information about the ldapvi
mailing list