Bug#379107: Reasoning behind 'encoding'/'termencoding' differences

Alain Bench veronatif at free.fr
Fri Apr 4 21:33:19 UTC 2008


Hello Kurt, James,

 On Thursday, April 3, 2008 at 19:23:53 +0200, Kurt Roeckx wrote:

> The termencoding should be based on the LCTYPE, and what "locale
> charmap" or nl_langinfo(CODESET) returns. I see no reason why you ever
> want this to be something else.

    Exactly. That should have been The proverbial Good Design. I don't
even understand the logic behind Vim's current somewhat twisted scheme,
and think that nothing can seriously justify it. The fact that one
single vimrc line fixes the problem is of course an excellent thing, but
it is not an excuse.

    My humble opinion on the best move here:

 -1) Adopt "let &termencoding = &encoding" in config.
 -2) Talk to upstream about the design.
 -3) I have no opinion about changing default encoding. Current default
or forced utf-8, both make sense.


> mutt and vim not agreeing on the encoding of the file. For this reason
> I also have to use:
>| au FileType mail setlocal fenc=latin1

    This is hardcoding a given charset, which should be avoided when
possible, because the Mutt+Vim couple would break in any other locale.
The ideal setting should follow the charset of the current locale. If
I correctly understood your settings, &fenc = &termencoding


Bye!	Alain.
-- 
How to Report Bugs Effectively
<URL:http://www.chiark.greenend.org.uk/~sgtatham/bugs.html>





More information about the pkg-vim-maintainers mailing list