On Thu, Oct 07, 2010 at 15:03:57 +0200, Matthias Apitz wrote:
> On Wednesday, October 06, 2010 a las 11:07:02AM -0400, Nathan Stratton 
> Treadway wrote:
> > In each of your two vim sessions, what does 
> >   :set encoding fileencoding fileencodings termencoding
> > show?
[...]
> 
> Xterm (ISO-8859-1) and 'vim'
> 
>   encoding=utf-8
>   fileencoding=latin1
>   fileencodings=ucs-bom,utf-8,default,latin1
>   termencoding=latin1
> 
> urxvt (UTF-8) and 'vim':
> 
>   encoding=utf-8
>   fileencoding=utf-8
>   fileencodings=ucs-bom,utf-8,default,latin1
>   termencoding=
> 
> 
> But, as I said, it works now. The problem was an ISO char in the
> $attribution and as well in the signature file;

Yeah, shortly after I sent my post I saw your followup message reporting
that you managed to jump right over the Vim-debugging step and identify
your underlying issue....


But in case anyone else ends up following this thread while tracking
down a similar problem, I'll go ahead and spell out what you might have
been able to discover by looking at these Vim settings:

The fact that "encoding" was set to UTF-8 in both cases indicates that
Vim was already using UTF-8 internally, so you didn't have to worry about
enabling that.

The "termencoding" settings each look correct; "latin1" for "Xterm" and
blank (which means it would use the value taken from "encoding", i.e.
UTF-8) for urxvt.

That leaves the "fileencoding" setting.  Obviously the values you show
above are also what you want... but I think that if you had checked
these settings while you were having the problem, you would have seen the
fileencoding reported as "latin1" in the urvxt case as well.

Since you had already noticed that Mutt was trying to pass a UTF-8 file
to Vim, the fact that Vim was opening the file using latin1 would have
been an indication that something was going wrong with that process...
and hopefully that would have helped you narrow down where to search for
the problem.

(In this case, the latin1 characters that ended up getting including in
the file meant that Vim would find it wasn't a valid UTF-8 file and thus
would fall back to using the latin1 encoding instead.)

                                                        Nathan

Reply via email to