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

James Vega jamessan at debian.org
Thu Apr 3 04:27:01 UTC 2008


On Sat, Dec 22, 2007 at 02:27:00PM +0100, Kurt Roeckx wrote:
> On Sat, Dec 22, 2007 at 01:36:48AM -0500, James Vega wrote:
> > After looking around in the help, the reasoning behind the current
> > behavior seems to be described in ":help encoding-table" and in general,
> > using the following will get the behavior you want:
> > 
> >   :let &termencoding = &encoding
> >   :set encoding=utf-8
> > 
> > There are various caveats explained in that help section though.  If you
> > feel the description and workaround are sufficient, please close the
> > bug.  Otherwise, I would be interested in hearing how this doesn't meet
> > your requirements.
> 
> So, what I would like is that atleast the
> ":let &termencoding = &encoding" is being done by default.  This seems
> to do exactly what I want: base the termencoding on the LC_CTYPE.

That is exactly what Vim does by default.  The problem is that you're
specifically telling Vim to ignore the environment for 'encoding' and
therefore need to tell Vim to use a different, possibly incompatible,
encoding when displaying the buffer and interpreting input.

Vim takes the safe choice and always bases 'termencoding' on 'encoding'
unless you tell it to do otherwise.  Your suggestion would be to remove
the middle-man ('encoding') and simply have 'termencoding' directly use
the the environment?

-- 
James
GPG Key: 1024D/61326D40 2003-09-02 James Vega <jamessan at debian.org>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
Url : http://lists.alioth.debian.org/pipermail/pkg-vim-maintainers/attachments/20080403/cad13b2d/attachment.pgp 


More information about the pkg-vim-maintainers mailing list